From 0348c8fcfaa22d4f2bf548ad9c187c09ef90c533 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Tue, 19 Jan 2021 11:35:04 +0000 Subject: getopt: Fix conversion from string-literal to non-const char * Define a non-const static char EMSG[] = "" to avoid having to add __DECONST() to all uses of EMSG. Also make current_dash a const char * to fix this warning. --- tools/build/mk/Makefile.boot | 1 + 1 file changed, 1 insertion(+) (limited to 'tools') diff --git a/tools/build/mk/Makefile.boot b/tools/build/mk/Makefile.boot index 38df8135e53b..7ebbf726e7f2 100644 --- a/tools/build/mk/Makefile.boot +++ b/tools/build/mk/Makefile.boot @@ -41,6 +41,7 @@ CWARNFLAGS+= -Wno-typedef-redefinition # bsd.sys.mk explicitly turns on -Wsystem-headers, but that's extremely # noisy when building on Linux. CWARNFLAGS+= -Wno-system-headers +CWARNFLAGS.clang+=-Werror=incompatible-pointer-types-discards-qualifiers # b64_pton and b64_ntop is in libresolv on MacOS and Linux: # TODO: only needed for uuencode and uudecode -- cgit v1.3