Commit 82c5c3a
committed
Fix compiler warnings. Reported by GCC with flags:
-Wall -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS
Note, e.g. sprintf(digest, "%s%02x", digest, ...) is undefined behaviour because
the destination and source variables overlap, and GCC warnings for this.
acmp.c:258:13: warning: 'acmp_clone_node_no_state' defined but not used [-Wunused-function]
apache2_config.c:806:9: warning: unused variable 'offset' [-Wunused-variable]
apache2_config.c:1886:23: warning: unused variable 'dcfg' [-Wunused-variable]
apache2_config.c:1942:23: warning: unused variable 'dcfg' [-Wunused-variable]
apache2_config.c:2470:23: warning: unused variable 'dcfg' [-Wunused-variable]
apache2_config.c:2538:23: warning: unused variable 'dcfg' [-Wunused-variable]
apache2_util.c:226:11: warning: unused variable 'str' [-Wunused-variable]
apache2_util.c:225:11: warning: unused variable 'saved' [-Wunused-variable]
apache2_util.c:224:11: warning: unused variable 'parse_remote' [-Wunused-variable]
apache2_util.c:223:11: warning: unused variable 'remote' [-Wunused-variable]
msc_status_engine.c:216:17: warning: unused variable 'i' [-Wunused-variable]
msc_status_engine.c:375:55: warning: the address of 'pcre' will always evaluate as 'true' [-Waddress]
msc_crypt.c:67:17: warning: unused variable 'bytes' [-Wunused-variable]
msc_crypt.c:1083:33: warning: variable 'enc' set but not used [-Wunused-but-set-variable]
msc_crypt.c:1090:29: warning: variable 'enc' set but not used [-Wunused-but-set-variable]
/usr/include/bits/stdio2.h:30:10: warning: '__sprintf_chk' argument 5 overlaps destination object 'digest' [-Wrestrict]
msc_json.c:405:11: warning: unused variable 'json_data' [-Wunused-variable]
msc_crypt.c:1097:79: warning: '%s' directive argument is null [-Wformat-overflow=]
msc_logging.c:1144:20: warning: unused variable 'now' [-Wunused-variable]
msc_remote_rules.c:729:19: warning: unused variable 'word' [-Wunused-variable]
msc_remote_rules.c:727:17: warning: unused variable 'tmp' [-Wunused-variable]
msc_remote_rules.c:805:1: warning: control reaches end of non-void function [-Wreturn-type]
msc_tree.c:836:19: warning: unused variable 'ip' [-Wunused-variable]
msc_xml.c:29:44: warning: variable 'entity' set but not used [-Wunused-but-set-variable]
msc_util.c:2627:11: warning: unused variable 'start' [-Wunused-variable]
msc_util.c:2626:17: warning: unused variable 'fd' [-Wunused-variable]
msc_util.c:2624:18: warning: unused variable 'rc' [-Wunused-variable]
msc_util.c:1077:19: warning: array subscript 1 is outside array bounds of 'unsigned char[1]' [-Warray-bounds=]1 parent 1a2de10 commit 82c5c3a
File tree
14 files changed
+13
-65
lines changed- apache2
14 files changed
+13
-65
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| 254 | + | |
254 | 255 | | |
255 | 256 | | |
256 | 257 | | |
| |||
262 | 263 | | |
263 | 264 | | |
264 | 265 | | |
| 266 | + | |
265 | 267 | | |
266 | 268 | | |
267 | 269 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
797 | 797 | | |
798 | 798 | | |
799 | 799 | | |
800 | | - | |
801 | 800 | | |
802 | 801 | | |
803 | 802 | | |
| |||
1935 | 1934 | | |
1936 | 1935 | | |
1937 | 1936 | | |
1938 | | - | |
1939 | 1937 | | |
1940 | 1938 | | |
1941 | 1939 | | |
| |||
1991 | 1989 | | |
1992 | 1990 | | |
1993 | 1991 | | |
1994 | | - | |
1995 | 1992 | | |
1996 | 1993 | | |
1997 | 1994 | | |
| |||
2519 | 2516 | | |
2520 | 2517 | | |
2521 | 2518 | | |
2522 | | - | |
2523 | 2519 | | |
2524 | 2520 | | |
2525 | 2521 | | |
| |||
2587 | 2583 | | |
2588 | 2584 | | |
2589 | 2585 | | |
2590 | | - | |
2591 | 2586 | | |
2592 | 2587 | | |
2593 | 2588 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | 218 | | |
223 | 219 | | |
224 | 220 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | 67 | | |
69 | 68 | | |
70 | 69 | | |
| |||
1079 | 1078 | | |
1080 | 1079 | | |
1081 | 1080 | | |
1082 | | - | |
1083 | | - | |
1084 | | - | |
1085 | | - | |
1086 | | - | |
| 1081 | + | |
| 1082 | + | |
1087 | 1083 | | |
1088 | 1084 | | |
1089 | 1085 | | |
1090 | | - | |
1091 | | - | |
1092 | 1086 | | |
1093 | 1087 | | |
1094 | 1088 | | |
1095 | 1089 | | |
1096 | 1090 | | |
1097 | | - | |
| 1091 | + | |
| 1092 | + | |
1098 | 1093 | | |
1099 | 1094 | | |
1100 | 1095 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
282 | | - | |
283 | 282 | | |
284 | 283 | | |
285 | 284 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
405 | | - | |
406 | 405 | | |
407 | 406 | | |
408 | 407 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1134 | 1134 | | |
1135 | 1135 | | |
1136 | 1136 | | |
1137 | | - | |
1138 | | - | |
1139 | 1137 | | |
1140 | 1138 | | |
1141 | 1139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
719 | 719 | | |
720 | 720 | | |
721 | 721 | | |
722 | | - | |
723 | 722 | | |
724 | | - | |
725 | 723 | | |
726 | 724 | | |
727 | 725 | | |
| |||
792 | 790 | | |
793 | 791 | | |
794 | 792 | | |
| 793 | + | |
795 | 794 | | |
796 | 795 | | |
797 | 796 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
168 | 167 | | |
169 | 168 | | |
170 | 169 | | |
| |||
213 | 212 | | |
214 | 213 | | |
215 | 214 | | |
216 | | - | |
217 | 215 | | |
218 | 216 | | |
219 | 217 | | |
| |||
290 | 288 | | |
291 | 289 | | |
292 | 290 | | |
293 | | - | |
294 | 291 | | |
295 | 292 | | |
296 | 293 | | |
| |||
321 | 318 | | |
322 | 319 | | |
323 | 320 | | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
| 321 | + | |
328 | 322 | | |
329 | 323 | | |
330 | 324 | | |
| |||
372 | 366 | | |
373 | 367 | | |
374 | 368 | | |
375 | | - | |
| 369 | + | |
376 | 370 | | |
377 | 371 | | |
378 | 372 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
833 | 833 | | |
834 | 834 | | |
835 | 835 | | |
836 | | - | |
| 836 | + | |
837 | 837 | | |
838 | 838 | | |
839 | 839 | | |
| |||
0 commit comments