Title: [285049] trunk/Source/WebKitLegacy/mac
- Revision
- 285049
- Author
- [email protected]
- Date
- 2021-10-29 14:08:22 -0700 (Fri, 29 Oct 2021)
Log Message
[WebKitLegacy] Enable -Wformat=2 warnings
<https://webkit.org/b/232333>
<rdar://problem/84681560>
Reviewed by Darin Adler.
* Configurations/Base.xcconfig:
(WARNING_CFLAGS):
- Replace -Wformat-security with -Wformat=2, which enables more
warnings like -Wformat-nonliteral.
* Misc/WebLocalizableStringsInternal.h:
(WebLocalizedStringInternal):
- Add NS_FORMAT_ARGUMENT() macro to fix -Wformat-nonliteral
warnings.
Modified Paths
Diff
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (285048 => 285049)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2021-10-29 20:54:56 UTC (rev 285048)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2021-10-29 21:08:22 UTC (rev 285049)
@@ -1,3 +1,20 @@
+2021-10-29 David Kilzer <[email protected]>
+
+ [WebKitLegacy] Enable -Wformat=2 warnings
+ <https://webkit.org/b/232333>
+ <rdar://problem/84681560>
+
+ Reviewed by Darin Adler.
+
+ * Configurations/Base.xcconfig:
+ (WARNING_CFLAGS):
+ - Replace -Wformat-security with -Wformat=2, which enables more
+ warnings like -Wformat-nonliteral.
+ * Misc/WebLocalizableStringsInternal.h:
+ (WebLocalizedStringInternal):
+ - Add NS_FORMAT_ARGUMENT() macro to fix -Wformat-nonliteral
+ warnings.
+
2021-10-29 Alex Christensen <[email protected]>
Remove code inside ENABLE(NETSCAPE_PLUGIN_API)
Modified: trunk/Source/WebKitLegacy/mac/Configurations/Base.xcconfig (285048 => 285049)
--- trunk/Source/WebKitLegacy/mac/Configurations/Base.xcconfig 2021-10-29 20:54:56 UTC (rev 285048)
+++ trunk/Source/WebKitLegacy/mac/Configurations/Base.xcconfig 2021-10-29 21:08:22 UTC (rev 285049)
@@ -88,7 +88,7 @@
OTHER_MIGFLAGS = -F$(BUILT_PRODUCTS_DIR);
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
PREBINDING = NO;
-WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat-security -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wvla -Wliteral-conversion -Wthread-safety;
+WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wvla -Wliteral-conversion -Wthread-safety;
TARGET_MACOS_LEGACY_VERSION_IDENTIFIER = $(TARGET_MACOS_LEGACY_VERSION_IDENTIFIER_$(MACOSX_DEPLOYMENT_TARGET:base))
TARGET_MACOS_LEGACY_VERSION_IDENTIFIER_10 = 10$(MACOSX_DEPLOYMENT_TARGET:suffix:identifier)
Modified: trunk/Source/WebKitLegacy/mac/Misc/WebLocalizableStringsInternal.h (285048 => 285049)
--- trunk/Source/WebKitLegacy/mac/Misc/WebLocalizableStringsInternal.h 2021-10-29 20:54:56 UTC (rev 285048)
+++ trunk/Source/WebKitLegacy/mac/Misc/WebLocalizableStringsInternal.h 2021-10-29 21:08:22 UTC (rev 285049)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011-2021 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -32,7 +32,7 @@
extern "C" {
#endif
-NSString *WebLocalizedStringInternal(const char* key);
+NSString *WebLocalizedStringInternal(const char* key) NS_FORMAT_ARGUMENT(1);
#ifdef __cplusplus
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes