Skip to content

Commit

Permalink
Silence gcc -Wunused-function
Browse files Browse the repository at this point in the history
gcc on MacOS-ARM64  may error out with

/Users/runner/work/php-src/php-src/ext/hash/blake3/upstream_blake3/c/blake3_dispatch.c:112:5: error: unused function 'get_cpu_features' [-Werror,-Wunused-function]

full compiler log https://github.com/php/php-src/actions/runs/7762643678/job/21173438425?pr=13194

- the optimal fix would be to make sure get_cpu_features() is only compiled on platforms where it is used, but that would take more effort (have not investigated how much effort that would be)
  • Loading branch information
divinity76 authored Feb 2, 2024
1 parent a65fcf6 commit e9b0456
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions c/blake3_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ size_t blake3_simd_degree(void) {
return 4;
}
#endif
#else
MAYBE_UNUSED(get_cpu_features)
#endif
#if BLAKE3_USE_NEON == 1
return 4;
Expand Down

0 comments on commit e9b0456

Please sign in to comment.