Skip to content

Commit

Permalink
Merge pull request #789 from bugsnag/analyzer-fixes
Browse files Browse the repository at this point in the history
[PLAT-4777] Fix some analyzer false positives.
  • Loading branch information
kstenerud authored Sep 3, 2020
2 parents 75ac232 + 43402a2 commit 8a0d267
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Bugsnag/KSCrash/Source/KSCrash/Recording/Tools/BSG_KSMach.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,8 @@ bool bsg_ksmachsuspendAllThreadsExcept(thread_t *exceptThreads,
// Don't treat this as a fatal error.
BSG_KSLOG_DEBUG("thread_suspend (%08x): %s", thread,
mach_error_string(kr));
// Suppress dead store warning when log level > debug
(void)kr;
}
}
}
Expand Down Expand Up @@ -386,6 +388,8 @@ bool bsg_ksmachresumeAllThreadsExcept(thread_t *exceptThreads,
// Don't treat this as a fatal error.
BSG_KSLOG_DEBUG("thread_resume (%08x): %s", thread,
mach_error_string(kr));
// Suppress dead store warning when log level > debug
(void)kr;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ bool bsg_mach_headers_populate_info(const struct mach_header *header, intptr_t s
void bsg_mach_headers_add_image(const struct mach_header *header, intptr_t slide) {

BSG_Mach_Header_Info *newImage = malloc(sizeof(BSG_Mach_Header_Info));
if (newImage != NULL && errno != ENOMEM) {
if (newImage != NULL) {
if (bsg_mach_headers_populate_info(header, slide, newImage)) {

bsg_mach_headers_cache_lock();
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Changelog
=========

## TBD

### Bug fixes

* Quiet some Analyzer false positives
[#789](https://github.com/bugsnag/bugsnag-cocoa/pull/789)

## 6.1.3 (2020-08-17)

### Bug fixes
Expand Down

0 comments on commit 8a0d267

Please sign in to comment.