Skip to content

Commit

Permalink
Makefile.uk: Silence function prototype warning
Browse files Browse the repository at this point in the history
Clang warns about functions defined in K&R style in zlib's codebase.
This change adds compiler flags to silence this warning.

Signed-off-by: Andrei Tatar <[email protected]>
  • Loading branch information
andreittr committed Jul 19, 2023
1 parent b895b8a commit 7fa5497
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile.uk
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,17 @@ CXXINCLUDES-$(CONFIG_LIBZLIB) += -I$(LIBZLIB_EXTRACTED)
################################################################################
# Global flags
################################################################################
LIBZLIB_SUPPRESS_FLAGS += -Wno-unused-parameter \
LIBZLIB_SUPPRESS_FLAGS-y += -Wno-unused-parameter \
-Wno-unused-variable \
-Wno-unused-value \
-Wno-unused-function \
-Wno-missing-field-initializers \
-Wno-implicit-fallthrough
LIBZLIB_SUPPRESS_FLAGS-$(call clang_version_ge,15,0) += -Wno-deprecated-non-prototype

LIBZLIB_CFLAGS-y += $(LIBZLIB_SUPPRESS_FLAGS) \
LIBZLIB_CFLAGS-y += $(LIBZLIB_SUPPRESS_FLAGS-y) \
-Wno-pointer-to-int-cast -Wno-int-to-pointer-cast
LIBZLIB_CXXFLAGS-y += $(LIBZLIB_SUPPRESS_FLAGS)
LIBZLIB_CXXFLAGS-y += $(LIBZLIB_SUPPRESS_FLAGS-y)

################################################################################
# Sources
Expand Down

0 comments on commit 7fa5497

Please sign in to comment.