fix a few warnings (missing consts, improper use of fprintf)

This commit is contained in:
swaits committed 2010-09-29 08:15:08 +00:00
1 parent 438ce11819
commit 0e599a0f57
1 file changed
+4 -4
+4 -4
View File
@@ -130,7 +130,7 @@ int FilesToScan()
} }
// return true if 'str' begins with 'sub', else false // return true if 'str' begins with 'sub', else false
bool StrBegins(char* str,char* sub) bool StrBegins(const char* str,const char* sub)
{ {
int i = 0; int i = 0;
while (str[i] && sub[i]) while (str[i] && sub[i])
@@ -209,7 +209,7 @@ char* StrSkipWhitespace(const char* str)
return c; return c;
} }
char* StrSeekCharSkipWhitespace(char* str,char* chars) char* StrSeekCharSkipWhitespace(char* str,const char* chars)
{ {
char* c = str; char* c = str;
c = StrSkipWhitespace(c); c = StrSkipWhitespace(c);
@@ -402,7 +402,7 @@ void OpenOutputFile()
char instr[4096]; char instr[4096];
while ( fgets(instr,4096,oldmakefile) ) while ( fgets(instr,4096,oldmakefile) )
{ {
fprintf(gOutputFile,instr); fputs(instr,gOutputFile);
if ( StrBegins(instr,MAKEFILETAGSHORT) ) if ( StrBegins(instr,MAKEFILETAGSHORT) )
{ {
fclose(oldmakefile); fclose(oldmakefile);
@@ -443,7 +443,7 @@ void CloseOutputFile()
char instr[4096]; char instr[4096];
while ( fgets(instr,4096,src) ) while ( fgets(instr,4096,src) )
{ {
fprintf(dest,instr); fputs(instr,dest);
} }
fclose(src); fclose(src);
fclose(dest); fclose(dest);