summaryrefslogtreecommitdiffstats
path: root/gcc/cpplib.c
diff options
context:
space:
mode:
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1997-09-11 22:51:33 +0000
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1997-09-11 22:51:33 +0000
commit945e4193af730885dbb63d47b76126482117e04b (patch)
tree7d4c6eefc6ca68463d3706e4a829710de5a9c182 /gcc/cpplib.c
parentea4a6c81ba2fc4674c5252de70ee9ae1e4ca8695 (diff)
downloadppe42-gcc-945e4193af730885dbb63d47b76126482117e04b.tar.gz
ppe42-gcc-945e4193af730885dbb63d47b76126482117e04b.zip
From Fred Fish, fix BeOS (I assume) related problem with mixing char pointers.
* cpplib.c (quote_string): Cast first arg of sprintf call from "unsigned char *" to "char *". (output_line_command): Ditto. (macroexpand): Ditto. (do_line): Cast atoi arg from "unsigned char *" to "char *". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15418 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpplib.c')
-rw-r--r--gcc/cpplib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/cpplib.c b/gcc/cpplib.c
index 2f0fff79f64..adbf269a431 100644
--- a/gcc/cpplib.c
+++ b/gcc/cpplib.c
@@ -510,7 +510,7 @@ quote_string (pfile, src)
CPP_PUTC_Q (pfile, c);
else
{
- sprintf (CPP_PWRITTEN (pfile), "\\%03o", c);
+ sprintf ((char *) CPP_PWRITTEN (pfile), "\\%03o", c);
CPP_ADJUST_WRITTEN (pfile, 4);
}
break;
@@ -2133,7 +2133,7 @@ output_line_command (pfile, conditional, file_change)
CPP_PUTS_Q (pfile, sharp_line, sizeof(sharp_line)-1);
}
- sprintf (CPP_PWRITTEN (pfile), "%d ", line);
+ sprintf ((char *) CPP_PWRITTEN (pfile), "%d ", line);
CPP_ADJUST_WRITTEN (pfile, strlen (CPP_PWRITTEN (pfile)));
quote_string (pfile, ip->nominal_fname);
@@ -2809,7 +2809,7 @@ macroexpand (pfile, hp)
else
{
CPP_RESERVE (pfile, 4);
- sprintf (CPP_PWRITTEN (pfile), "\\%03o",
+ sprintf ((char *) CPP_PWRITTEN (pfile), "\\%03o",
(unsigned int) c);
CPP_ADJUST_WRITTEN (pfile, 4);
}
@@ -3728,7 +3728,7 @@ do_line (pfile, keyword)
/* The Newline at the end of this line remains to be processed.
To put the next line at the specified line number,
we must store a line number now that is one less. */
- new_lineno = atoi (pfile->token_buffer + old_written) - 1;
+ new_lineno = atoi ((char *) pfile->token_buffer + old_written) - 1;
CPP_SET_WRITTEN (pfile, old_written);
/* NEW_LINENO is one less than the actual line number here. */
OpenPOWER on IntegriCloud