Browse files

GetFileContents: Shut up a few warnings.

  • Loading branch information...
1 parent 4107117 commit 49d254e1f49cf0f7c6471e41bae53b9373a4931b @uliwitness uliwitness committed Apr 9, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 GetFileContents.c
View
4 GetFileContents.c
@@ -42,7 +42,7 @@ char* GetFileContents( const char* fname )
// Find out file length:
fseek( theFile, 0, SEEK_END );
- int len = ftell( theFile ),
+ long len = ftell( theFile ),
readbytes;
char* codeStr = (char*) calloc( len +1, sizeof(char) );
@@ -53,7 +53,7 @@ char* GetFileContents( const char* fname )
{
free( codeStr );
fclose( theFile );
- printf("ERROR: Couldn't read from file \"%s\" (%d bytes read).\n",fname,readbytes);
+ printf("ERROR: Couldn't read from file \"%s\" (%ld bytes read).\n",fname,readbytes);
return NULL;
}
codeStr[len] = 0; // Terminate string.

0 comments on commit 49d254e

Please sign in to comment.