summaryrefslogtreecommitdiffstats
path: root/src/misc/extra
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2012-02-16 21:53:16 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2012-02-16 21:53:16 -0800
commit791b107e7a225103ee76c921c3c4a96d0e1adae2 (patch)
tree80d8e58053fbca2087d57b7fa8cbca7c594aa764 /src/misc/extra
parent933744347b36315b42338dfdee5934f87d029398 (diff)
downloadabc-791b107e7a225103ee76c921c3c4a96d0e1adae2.tar.gz
abc-791b107e7a225103ee76c921c3c4a96d0e1adae2.tar.bz2
abc-791b107e7a225103ee76c921c3c4a96d0e1adae2.zip
Silencing some of the gcc warnings.
Diffstat (limited to 'src/misc/extra')
-rw-r--r--src/misc/extra/extraUtilFile.c3
-rw-r--r--src/misc/extra/extraUtilReader.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/src/misc/extra/extraUtilFile.c b/src/misc/extra/extraUtilFile.c
index b38befd6..e2c32ec3 100644
--- a/src/misc/extra/extraUtilFile.c
+++ b/src/misc/extra/extraUtilFile.c
@@ -235,6 +235,7 @@ char * Extra_FileRead( FILE * pFile )
{
int nFileSize;
char * pBuffer;
+ int RetValue;
// get the file size, in bytes
fseek( pFile, 0, SEEK_END );
nFileSize = ftell( pFile );
@@ -242,7 +243,7 @@ char * Extra_FileRead( FILE * pFile )
rewind( pFile );
// load the contents of the file into memory
pBuffer = ABC_ALLOC( char, nFileSize + 3 );
- fread( pBuffer, nFileSize, 1, pFile );
+ RetValue = fread( pBuffer, nFileSize, 1, pFile );
// terminate the string with '\0'
pBuffer[ nFileSize + 0] = '\n';
pBuffer[ nFileSize + 1] = '\0';
diff --git a/src/misc/extra/extraUtilReader.c b/src/misc/extra/extraUtilReader.c
index 41e02a27..44fc080b 100644
--- a/src/misc/extra/extraUtilReader.c
+++ b/src/misc/extra/extraUtilReader.c
@@ -91,6 +91,7 @@ Extra_FileReader_t * Extra_FileReaderAlloc( char * pFileName,
FILE * pFile;
char * pChar;
int nCharsToRead;
+ int RetValue;
// check if the file can be opened
pFile = fopen( pFileName, "rb" );
if ( pFile == NULL )
@@ -122,7 +123,7 @@ Extra_FileReader_t * Extra_FileReaderAlloc( char * pFileName,
// determine how many chars to read
nCharsToRead = EXTRA_MINIMUM(p->nFileSize, EXTRA_BUFFER_SIZE);
// load the first part into the buffer
- fread( p->pBuffer, nCharsToRead, 1, p->pFile );
+ RetValue = fread( p->pBuffer, nCharsToRead, 1, p->pFile );
p->nFileRead = nCharsToRead;
// set the ponters to the end and the stopping point
p->pBufferEnd = p->pBuffer + nCharsToRead;
@@ -361,6 +362,7 @@ void * Extra_FileReaderGetTokens_int( Extra_FileReader_t * p )
void Extra_FileReaderReload( Extra_FileReader_t * p )
{
int nCharsUsed, nCharsToRead;
+ int RetValue;
assert( !p->fStop );
assert( p->pBufferCur > p->pBufferStop );
assert( p->pBufferCur < p->pBufferEnd );
@@ -372,7 +374,7 @@ void Extra_FileReaderReload( Extra_FileReader_t * p )
// determine how many chars we will read
nCharsToRead = EXTRA_MINIMUM( p->nBufferSize - nCharsUsed, p->nFileSize - p->nFileRead );
// read the chars
- fread( p->pBuffer + nCharsUsed, nCharsToRead, 1, p->pFile );
+ RetValue = fread( p->pBuffer + nCharsUsed, nCharsToRead, 1, p->pFile );
p->nFileRead += nCharsToRead;
// set the ponters to the end and the stopping point
p->pBufferEnd = p->pBuffer + nCharsUsed + nCharsToRead;