- Notifications
You must be signed in to change notification settings - Fork4.9k
Commita4c3f7d

Neil Conway
GCC 4.0 includes a new warning option, -Wformat-literal, that emits
a warning when a variable is used as a format string for printf()and similar functions (if the variable is derived from untrusteddata, it could include unexpected formatting sequences). Thisemits too many warnings to be enabled by default, but it doesflag a few dubious constructs in the Postgres tree. This patchfixes up the obvious variants: functions that are passed a variableformat string but no additional arguments.This patch fixes a bug in pg_dump (triggers with formatting sequencesin their names are not dumped correctly) and some related pg_dumpcode that looks dubious; cleanups for more harmless instances havebeen applied to more recent branches. This patch also fixes anadditional format string bug that is present in 7.2 but not in laterreleases: pg_dump would also fail to correctly dump indexes withformatting sequences in their names.1 parent6dce59c commita4c3f7d
2 files changed
+8
-8
lines changedLines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 |
| - | |
| 18 | + | |
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
| |||
391 | 391 |
| |
392 | 392 |
| |
393 | 393 |
| |
394 |
| - | |
| 394 | + | |
395 | 395 |
| |
396 | 396 |
| |
397 | 397 |
| |
| |||
2006 | 2006 |
| |
2007 | 2007 |
| |
2008 | 2008 |
| |
2009 |
| - | |
| 2009 | + | |
2010 | 2010 |
| |
2011 | 2011 |
| |
2012 | 2012 |
| |
|
Lines changed: 5 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
25 |
| - | |
| 25 | + | |
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
| |||
436 | 436 |
| |
437 | 437 |
| |
438 | 438 |
| |
439 |
| - | |
| 439 | + | |
440 | 440 |
| |
441 | 441 |
| |
442 | 442 |
| |
| |||
2599 | 2599 |
| |
2600 | 2600 |
| |
2601 | 2601 |
| |
2602 |
| - | |
| 2602 | + | |
2603 | 2603 |
| |
2604 | 2604 |
| |
2605 | 2605 |
| |
2606 | 2606 |
| |
2607 |
| - | |
| 2607 | + | |
2608 | 2608 |
| |
2609 | 2609 |
| |
2610 | 2610 |
| |
| |||
4483 | 4483 |
| |
4484 | 4484 |
| |
4485 | 4485 |
| |
4486 |
| - | |
| 4486 | + | |
4487 | 4487 |
| |
4488 | 4488 |
| |
4489 | 4489 |
| |
|
0 commit comments
Comments
(0)