diff options
| author | Paul Eggert | 2011-04-05 22:19:39 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-04-05 22:19:39 -0700 |
| commit | 41cf7d1aec986e1b92ca14231ac4ec242c233d45 (patch) | |
| tree | 7360e455dc2e0043a31fda1d29cc6323aa213104 /lib-src | |
| parent | 1e3cdd8228651f226beb6ac75453968a6c64feff (diff) | |
| parent | b69769da408705e40929b793d79d3bfe6a3a5a48 (diff) | |
| download | emacs-41cf7d1aec986e1b92ca14231ac4ec242c233d45.tar.gz emacs-41cf7d1aec986e1b92ca14231ac4ec242c233d45.zip | |
Fix more problems found by GCC 4.6.0's static checks.
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/ChangeLog | 9 | ||||
| -rw-r--r-- | lib-src/emacsclient.c | 1 | ||||
| -rw-r--r-- | lib-src/make-docfile.c | 9 |
3 files changed, 18 insertions, 1 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 5007995e14e..eed9dc916b9 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2011-04-06 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Fix more problems found by GCC 4.6.0's static checks. | ||
| 4 | |||
| 5 | * emacsclient.c (message): Mark it as a printf-like function. | ||
| 6 | |||
| 7 | * make-docfile.c (IF_LINT): New macro, copied from emacsclient.c. | ||
| 8 | (write_c_args): Use it to suppress GCC warning. | ||
| 9 | |||
| 1 | 2011-03-30 Paul Eggert <eggert@cs.ucla.edu> | 10 | 2011-03-30 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 11 | ||
| 3 | Fix a problem found by GCC 4.6.0's static checks. | 12 | Fix a problem found by GCC 4.6.0's static checks. |
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 737a8d88586..c5231fb9989 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c | |||
| @@ -487,6 +487,7 @@ ttyname (int fd) | |||
| 487 | 487 | ||
| 488 | /* Display a normal or error message. | 488 | /* Display a normal or error message. |
| 489 | On Windows, use a message box if compiled as a Windows app. */ | 489 | On Windows, use a message box if compiled as a Windows app. */ |
| 490 | static void message (int, const char *, ...) ATTRIBUTE_FORMAT_PRINTF (2, 3); | ||
| 490 | static void | 491 | static void |
| 491 | message (int is_error, const char *format, ...) | 492 | message (int is_error, const char *format, ...) |
| 492 | { | 493 | { |
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index f900ea42e91..9b804684a12 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c | |||
| @@ -66,6 +66,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 66 | #define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP) | 66 | #define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP) |
| 67 | #endif | 67 | #endif |
| 68 | 68 | ||
| 69 | /* Use this to suppress gcc's `...may be used before initialized' warnings. */ | ||
| 70 | #ifdef lint | ||
| 71 | # define IF_LINT(Code) Code | ||
| 72 | #else | ||
| 73 | # define IF_LINT(Code) /* empty */ | ||
| 74 | #endif | ||
| 75 | |||
| 69 | static int scan_file (char *filename); | 76 | static int scan_file (char *filename); |
| 70 | static int scan_lisp_file (const char *filename, const char *mode); | 77 | static int scan_lisp_file (const char *filename, const char *mode); |
| 71 | static int scan_c_file (char *filename, const char *mode); | 78 | static int scan_c_file (char *filename, const char *mode); |
| @@ -481,7 +488,7 @@ write_c_args (FILE *out, char *func, char *buf, int minargs, int maxargs) | |||
| 481 | { | 488 | { |
| 482 | register char *p; | 489 | register char *p; |
| 483 | int in_ident = 0; | 490 | int in_ident = 0; |
| 484 | char *ident_start; | 491 | char *ident_start IF_LINT (= NULL); |
| 485 | size_t ident_length = 0; | 492 | size_t ident_length = 0; |
| 486 | 493 | ||
| 487 | fprintf (out, "(fn"); | 494 | fprintf (out, "(fn"); |