Skip to content

Commit

Permalink
mac: Fix build with deployment target ≥ 11
Browse files Browse the repository at this point in the history
This fixes the following warning during compilation:

> process_reader_mac_test.cc:670:7: warning: address of function
> '_dyld_shared_cache_contains_path' will always evaluate to 'true'
> [-Wpointer-bool-conversion]

while still retaining compatibility with pre-macOS 11 runtimes when
built with a suitable deployment target.

Bug: 461
Change-Id: I61a360e8e02ceb7209c887819a4916a68384b89d
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4873433
Reviewed-by: Joshua Peraza <[email protected]>
Commit-Queue: Mark Mentovai <[email protected]>
  • Loading branch information
markmentovai authored and Crashpad LUCI CQ committed Sep 19, 2023
1 parent d25c332 commit 8da335f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion snapshot/mac/process_reader_mac_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ void VerifyImageExistenceAndTimestamp(const char* path, time_t timestamp) {

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunguarded-availability"
if (_dyld_shared_cache_contains_path &&
if (&_dyld_shared_cache_contains_path &&
_dyld_shared_cache_contains_path(path)) {
#pragma clang diagnostic pop
// The timestamp will either match the timestamp of the dyld_shared_cache
Expand Down

0 comments on commit 8da335f

Please sign in to comment.