MSVC C4551 compiler warnings in platform.h #236

Closed
opened 2026-01-29 20:40:25 +00:00 by claunia · 1 comment
Owner

Originally created by @rvandermeulen on GitHub (May 31, 2018).

I was taking a look at updating Firefox' vendored copy of brotli to version 1.0.4 today.

Along the way, I ran into Werror bustage in platform.h within the newly-added BROTLI_UNUSED_FUNCTION void BrotliSuppressUnusedFunctions(void) block. MSVC gives a "warning C4551: function call missing argument list" error for each subsequent line within it.

The warning is fixable by explicitly making those all references instead, i.e. BROTLI_UNUSED(&BrotliSuppressUnusedFunctions) instead of BROTLI_UNUSED(BrotliSuppressUnusedFunctions). As far as I can tell, everything compiles and functions fine with GCC and clang as well with this change.

Originally created by @rvandermeulen on GitHub (May 31, 2018). I was taking a look at updating Firefox' vendored copy of brotli to version 1.0.4 today. Along the way, I ran into Werror bustage in platform.h within the newly-added `BROTLI_UNUSED_FUNCTION void BrotliSuppressUnusedFunctions(void)` block. MSVC gives a "warning C4551: function call missing argument list" error for each subsequent line within it. The warning is fixable by explicitly making those all references instead, i.e. `BROTLI_UNUSED(&BrotliSuppressUnusedFunctions)` instead of `BROTLI_UNUSED(BrotliSuppressUnusedFunctions)`. As far as I can tell, everything compiles and functions fine with GCC and clang as well with this change.
Author
Owner

@eustas commented on GitHub (Jun 4, 2018):

Going to do that soon. Thanks for reporting.

@eustas commented on GitHub (Jun 4, 2018): Going to do that soon. Thanks for reporting.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#236