]> git.eshelyaron.com Git - emacs.git/commitdiff
* make-docfile.c (IF_LINT): New macro, copied from emacsclient.c.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 1 Apr 2011 20:28:50 +0000 (13:28 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 1 Apr 2011 20:28:50 +0000 (13:28 -0700)
(write_c_args): Use it to suppress GCC warning.

lib-src/ChangeLog
lib-src/make-docfile.c

index 5007995e14e4699c36991b21586e337cda3e3994..78548ee68707ea3abcc1e087cb54d021b0e85dc3 100644 (file)
@@ -1,3 +1,8 @@
+2011-04-01  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * make-docfile.c (IF_LINT): New macro, copied from emacsclient.c.
+       (write_c_args): Use it to suppress GCC warning.
+
 2011-03-30  Paul Eggert  <eggert@cs.ucla.edu>
 
        Fix a problem found by GCC 4.6.0's static checks.
index f900ea42e91cf8731a564c3c82cf71e124865fe5..9b804684a1238ea8ec60b8ca60f7732cb8428a5e 100644 (file)
@@ -66,6 +66,13 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)
 #endif
 
+/* Use this to suppress gcc's `...may be used before initialized' warnings. */
+#ifdef lint
+# define IF_LINT(Code) Code
+#else
+# define IF_LINT(Code) /* empty */
+#endif
+
 static int scan_file (char *filename);
 static int scan_lisp_file (const char *filename, const char *mode);
 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)
 {
   register char *p;
   int in_ident = 0;
-  char *ident_start;
+  char *ident_start IF_LINT (= NULL);
   size_t ident_length = 0;
 
   fprintf (out, "(fn");