summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/ChangeLog5
-rw-r--r--lib-src/make-docfile.c9
2 files changed, 13 insertions, 1 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 5007995e14e..78548ee6870 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -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.
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/>. */
#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");