Commit ee53f84
authored
[runtime] Adopt safer native compiler flags: Wformat-nonliteral (#24090)
Example warning:
```objc
nsstring-localization.m:33:46: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
33 | return [NSString localizedStringWithFormat: format, a];
| ^~~~~~
```
References:
* https://developer.apple.com/documentation/xcode/enabling-enhanced-security-for-your-app
* https://releases.llvm.org/8.0.0/tools/clang/docs/ReleaseNotes.html#major-new-features (for -ftrivial-auto-var-init=zero)
Contributes towards #23023.1 parent a39e1f0 commit ee53f84
3 files changed
+31
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1310 | 1310 | | |
1311 | 1311 | | |
1312 | 1312 | | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
1313 | 1320 | | |
| 1321 | + | |
| 1322 | + | |
1314 | 1323 | | |
1315 | 1324 | | |
1316 | 1325 | | |
| |||
1323 | 1332 | | |
1324 | 1333 | | |
1325 | 1334 | | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
1326 | 1342 | | |
| 1343 | + | |
| 1344 | + | |
1327 | 1345 | | |
1328 | 1346 | | |
1329 | 1347 | | |
| |||
2552 | 2570 | | |
2553 | 2571 | | |
2554 | 2572 | | |
| 2573 | + | |
| 2574 | + | |
| 2575 | + | |
| 2576 | + | |
| 2577 | + | |
| 2578 | + | |
2555 | 2579 | | |
| 2580 | + | |
2556 | 2581 | | |
2557 | 2582 | | |
2558 | 2583 | | |
| |||
0 commit comments