Commit 22d9f2cf by Kaveh R. Ghazi Committed by Kaveh Ghazi

Warning fixes:

        * gcc.c (read_specs): Ensure format specifiers match their arguments.

From-SVN: r24604
parent c2c41b7e
Sat Jan 9 23:22:04 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.c (read_specs): Ensure format specifiers match their arguments.
Sat Jan 9 20:04:24 1999 Richard Henderson <rth@cygnus.com> Sat Jan 9 20:04:24 1999 Richard Henderson <rth@cygnus.com>
* tree.c (copy_node): Oops. That would be copy not zero * tree.c (copy_node): Oops. That would be copy not zero
......
...@@ -1489,8 +1489,8 @@ read_specs (filename, main_p) ...@@ -1489,8 +1489,8 @@ read_specs (filename, main_p)
p1++; p1++;
if (*p1++ != '<' || p[-2] != '>') if (*p1++ != '<' || p[-2] != '>')
fatal ("specs %%include syntax malformed after %d characters", fatal ("specs %%include syntax malformed after %ld characters",
p1 - buffer + 1); (long) (p1 - buffer + 1));
p[-2] = '\0'; p[-2] = '\0';
new_filename = find_a_file (&startfile_prefixes, p1, R_OK); new_filename = find_a_file (&startfile_prefixes, p1, R_OK);
...@@ -1507,8 +1507,8 @@ read_specs (filename, main_p) ...@@ -1507,8 +1507,8 @@ read_specs (filename, main_p)
while (*p1 == ' ' || *p1 == '\t') p1++; while (*p1 == ' ' || *p1 == '\t') p1++;
if (*p1++ != '<' || p[-2] != '>') if (*p1++ != '<' || p[-2] != '>')
fatal ("specs %%include syntax malformed after %d characters", fatal ("specs %%include syntax malformed after %ld characters",
p1 - buffer + 1); (long) (p1 - buffer + 1));
p[-2] = '\0'; p[-2] = '\0';
new_filename = find_a_file (&startfile_prefixes, p1, R_OK); new_filename = find_a_file (&startfile_prefixes, p1, R_OK);
...@@ -1531,16 +1531,16 @@ read_specs (filename, main_p) ...@@ -1531,16 +1531,16 @@ read_specs (filename, main_p)
p1++; p1++;
if (! ISALPHA ((unsigned char)*p1)) if (! ISALPHA ((unsigned char)*p1))
fatal ("specs %%rename syntax malformed after %d characters", fatal ("specs %%rename syntax malformed after %ld characters",
p1 - buffer); (long) (p1 - buffer));
p2 = p1; p2 = p1;
while (*p2 && !ISSPACE ((unsigned char)*p2)) while (*p2 && !ISSPACE ((unsigned char)*p2))
p2++; p2++;
if (*p2 != ' ' && *p2 != '\t') if (*p2 != ' ' && *p2 != '\t')
fatal ("specs %%rename syntax malformed after %d characters", fatal ("specs %%rename syntax malformed after %ld characters",
p2 - buffer); (long) (p2 - buffer));
name_len = p2 - p1; name_len = p2 - p1;
*p2++ = '\0'; *p2++ = '\0';
...@@ -1548,8 +1548,8 @@ read_specs (filename, main_p) ...@@ -1548,8 +1548,8 @@ read_specs (filename, main_p)
p2++; p2++;
if (! ISALPHA ((unsigned char)*p2)) if (! ISALPHA ((unsigned char)*p2))
fatal ("specs %%rename syntax malformed after %d characters", fatal ("specs %%rename syntax malformed after %ld characters",
p2 - buffer); (long) (p2 - buffer));
/* Get new spec name */ /* Get new spec name */
p3 = p2; p3 = p2;
...@@ -1557,8 +1557,8 @@ read_specs (filename, main_p) ...@@ -1557,8 +1557,8 @@ read_specs (filename, main_p)
p3++; p3++;
if (p3 != p-1) if (p3 != p-1)
fatal ("specs %%rename syntax malformed after %d characters", fatal ("specs %%rename syntax malformed after %ld characters",
p3 - buffer); (long) (p3 - buffer));
*p3 = '\0'; *p3 = '\0';
for (sl = specs; sl; sl = sl->next) for (sl = specs; sl; sl = sl->next)
...@@ -1588,8 +1588,8 @@ read_specs (filename, main_p) ...@@ -1588,8 +1588,8 @@ read_specs (filename, main_p)
continue; continue;
} }
else else
fatal ("specs unknown %% command after %d characters", fatal ("specs unknown %% command after %ld characters",
p1 - buffer); (long) (p1 - buffer));
} }
/* Find the colon that should end the suffix. */ /* Find the colon that should end the suffix. */
...@@ -1599,7 +1599,8 @@ read_specs (filename, main_p) ...@@ -1599,7 +1599,8 @@ read_specs (filename, main_p)
/* The colon shouldn't be missing. */ /* The colon shouldn't be missing. */
if (*p1 != ':') if (*p1 != ':')
fatal ("specs file malformed after %d characters", p1 - buffer); fatal ("specs file malformed after %ld characters",
(long) (p1 - buffer));
/* Skip back over trailing whitespace. */ /* Skip back over trailing whitespace. */
p2 = p1; p2 = p1;
...@@ -1611,7 +1612,8 @@ read_specs (filename, main_p) ...@@ -1611,7 +1612,8 @@ read_specs (filename, main_p)
/* Find the next line. */ /* Find the next line. */
p = skip_whitespace (p1 + 1); p = skip_whitespace (p1 + 1);
if (p[1] == 0) if (p[1] == 0)
fatal ("specs file malformed after %d characters", p - buffer); fatal ("specs file malformed after %ld characters",
(long) (p - buffer));
p1 = p; p1 = p;
/* Find next blank line or end of string. */ /* Find next blank line or end of string. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment