Skip to content

Commit 4a50778

Browse files
committed
8353458: Don't pass -Wno-format-nonliteral to CFLAGS
Reviewed-by: erikj
1 parent 9076673 commit 4a50778

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

make/modules/jdk.jpackage/Lib.gmk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ $(eval $(call SetupJdkExecutable, BUILD_JPACKAGEAPPLAUNCHER, \
6161
DISABLED_WARNINGS_clang_Log.cpp := unused-const-variable, \
6262
CFLAGS_FILTER_OUT := -MD, \
6363
CXXFLAGS_FILTER_OUT := -MD, \
64-
CFLAGS_macosx := -Wno-format-nonliteral, \
6564
CFLAGS_windows := -MT $(JPACKAGE_CFLAGS_windows), \
6665
CXXFLAGS_windows := -MT $(JPACKAGE_CXXFLAGS_windows), \
6766
LD_SET_ORIGIN := false, \

src/jdk.jpackage/share/native/common/tstrings.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ tstring unsafe_format(tstring::const_pointer format, ...) {
5252
#ifdef _MSC_VER
5353
ret = _vsntprintf_s(&*fmtout.begin(), fmtout.size(), _TRUNCATE, format, args);
5454
#else
55-
#if defined(__GNUC__) && __GNUC__ >= 5
55+
#if defined(__GNUC__)
5656
#pragma GCC diagnostic push
5757
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
5858
#endif
5959
// With g++ this compiles only with '-std=gnu++0x' option
6060
ret = vsnprintf(&*fmtout.begin(), fmtout.size(), format, args);
61-
#if defined(__GNUC__) && __GNUC__ >= 5
61+
#if defined(__GNUC__)
6262
#pragma GCC diagnostic pop
6363
#endif
6464
#endif

0 commit comments

Comments
 (0)