Skip to content

Commit 3705993

Browse files
committed
Makefile.uk: Silence function prototype warning
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 <andrei@unikraft.io>
1 parent b895b8a commit 3705993

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Makefile.uk

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,17 @@ CXXINCLUDES-$(CONFIG_LIBZLIB) += -I$(LIBZLIB_EXTRACTED)
5959
################################################################################
6060
# Global flags
6161
################################################################################
62-
LIBZLIB_SUPPRESS_FLAGS += -Wno-unused-parameter \
62+
LIBZLIB_SUPPRESS_FLAGS-y += -Wno-unused-parameter \
6363
-Wno-unused-variable \
6464
-Wno-unused-value \
6565
-Wno-unused-function \
6666
-Wno-missing-field-initializers \
6767
-Wno-implicit-fallthrough
68+
LIBZLIB_SUPPRESS_FLAGS-$(call have_clang) += -Wno-deprecated-non-prototype
6869

69-
LIBZLIB_CFLAGS-y += $(LIBZLIB_SUPPRESS_FLAGS) \
70+
LIBZLIB_CFLAGS-y += $(LIBZLIB_SUPPRESS_FLAGS-y) \
7071
-Wno-pointer-to-int-cast -Wno-int-to-pointer-cast
71-
LIBZLIB_CXXFLAGS-y += $(LIBZLIB_SUPPRESS_FLAGS)
72+
LIBZLIB_CXXFLAGS-y += $(LIBZLIB_SUPPRESS_FLAGS-y)
7273

7374
################################################################################
7475
# Sources

0 commit comments

Comments
 (0)