diff options
-rw-r--r-- | cppsetup.c | 2 | ||||
-rw-r--r-- | def.h | 6 | ||||
-rw-r--r-- | imakemdep.h | 2 | ||||
-rw-r--r-- | main.c | 2 | ||||
-rw-r--r-- | parse.c | 10 | ||||
-rw-r--r-- | pr.c | 4 |
6 files changed, 13 insertions, 13 deletions
@@ -71,7 +71,7 @@ lookup_variable (IfParser *ip, const char *var, int len) struct _parse_data *pd = (struct _parse_data *) ip->data; if (len > MAXNAMELEN) - return 0; + return NULL; strncpy (tmpbuf, var, len); tmpbuf[len] = '\0'; @@ -176,6 +176,6 @@ int cppsetup(const char *filename, struct inclist *inc); -extern void fatalerr(const char *, ...); -extern void warning(const char *, ...); -extern void warning1(const char *, ...); +extern void fatalerr(const char *, ...) _X_ATTRIBUTE_PRINTF(1, 2); +extern void warning(const char *, ...) _X_ATTRIBUTE_PRINTF(1, 2); +extern void warning1(const char *, ...) _X_ATTRIBUTE_PRINTF(1, 2); diff --git a/imakemdep.h b/imakemdep.h index 60222a2..97ff5b4 100644 --- a/imakemdep.h +++ b/imakemdep.h @@ -48,7 +48,7 @@ in this Software without prior written authorization from The Open Group. #undef DEF_STRINGIFY #define DEF_EVALUATE(__x) #__x #define DEF_STRINGIFY(_x) DEF_EVALUATE(_x) -const struct symtab predefs[] = { +static const struct symtab predefs[] = { #ifdef apollo {"apollo", "1"}, #endif @@ -143,7 +143,7 @@ catch (int sig) #define sa_mask sv_mask #define sa_flags sv_flags #endif -struct sigaction sig_act; +static struct sigaction sig_act; #endif /* USGISH */ #ifndef USING_AUTOCONF @@ -90,7 +90,7 @@ gobble(struct filepointer *filep, struct inclist *file, warning("%s", file_red->i_file); if (file_red != file) warning1(" (reading %s)", file->i_file); - warning1(", line %d: unknown directive == \"%s\"\n", + warning1(", line %ld: unknown directive == \"%s\"\n", filep->f_line, line); break; } @@ -637,7 +637,7 @@ find_includes(struct filepointer *filep, struct inclist *file, warning("%s", file_red->i_file); if (file_red != file) warning1(" (reading %s)", file->i_file); - warning1(", line %d: incomplete undef == \"%s\"\n", + warning1(", line %ld: incomplete undef == \"%s\"\n", filep->f_line, line); break; } @@ -660,7 +660,7 @@ find_includes(struct filepointer *filep, struct inclist *file, warning("%s", file_red->i_file); if (file_red != file) warning1(" (reading %s)", file->i_file); - warning1(", line %d: %s\n", + warning1(", line %ld: %s\n", filep->f_line, line); break; @@ -673,14 +673,14 @@ find_includes(struct filepointer *filep, struct inclist *file, warning("%s", file_red->i_file); if (file_red != file) warning1(" (reading %s)", file->i_file); - warning1(", line %d: unknown directive == \"%s\"\n", + warning1(", line %ld: unknown directive == \"%s\"\n", filep->f_line, line); break; case -2: warning("%s", file_red->i_file); if (file_red != file) warning1(" (reading %s)", file->i_file); - warning1(", line %d: incomplete include == \"%s\"\n", + warning1(", line %ld: incomplete include == \"%s\"\n", filep->f_line, line); break; } @@ -53,10 +53,10 @@ add_include(struct filepointer *filep, struct inclist *file, if (failOK) return; if (file != file_red) - warning("%s (reading %s, line %d): ", + warning("%s (reading %s, line %ld): ", file_red->i_file, file->i_file, filep->f_line); else - warning("%s, line %d: ", file->i_file, filep->f_line); + warning("%s, line %ld: ", file->i_file, filep->f_line); warning1("cannot find include file \"%s\"\n", include); show_where_not = TRUE; newfile = inc_path(file->i_file, include, type); |