summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cppsetup.c2
-rw-r--r--def.h6
-rw-r--r--imakemdep.h2
-rw-r--r--main.c2
-rw-r--r--parse.c10
-rw-r--r--pr.c4
6 files changed, 13 insertions, 13 deletions
diff --git a/cppsetup.c b/cppsetup.c
index 5824253..3b010cb 100644
--- a/cppsetup.c
+++ b/cppsetup.c
@@ -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';
diff --git a/def.h b/def.h
index ca37e73..6c705a1 100644
--- a/def.h
+++ b/def.h
@@ -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
diff --git a/main.c b/main.c
index 802ef3d..46e7c73 100644
--- a/main.c
+++ b/main.c
@@ -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
diff --git a/parse.c b/parse.c
index 36dc558..91a8df7 100644
--- a/parse.c
+++ b/parse.c
@@ -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;
}
diff --git a/pr.c b/pr.c
index dd9ee6e..4afffd6 100644
--- a/pr.c
+++ b/pr.c
@@ -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);