Skip to content

Commit

Permalink
Silenced harmless warning about ignoring the ret val of fgets()
Browse files Browse the repository at this point in the history
  • Loading branch information
osj1961 committed Jan 8, 2024
1 parent 6ada730 commit 42e3119
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/leon/src/readdes.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ static Matrix_01 *xRead01Matrix(
Unsigned requiredSetSize,
Unsigned requiredNumberOfRows,
Unsigned requiredNumberOfCols);

char *rv;

/*-------------------------- readDesign -----------------------------------*/

Expand Down Expand Up @@ -62,7 +62,7 @@ Matrix_01 *readDesign(
not found. */
rewind( libFile);
for (;;) {
fgets( inputBuffer, 80, libFile);
rv = fgets( inputBuffer, 80, libFile);
if ( feof(libFile) )
ERROR1s( "readDesign", "Library block ", libName,
" not found in specified library.")
Expand Down Expand Up @@ -228,7 +228,7 @@ Matrix_01 *read01Matrix(
rewind( libFile);
firstIdent = TRUE;
for (;;) {
fgets( inputBuffer, 80, libFile);
rv = fgets( inputBuffer, 80, libFile);
if ( feof(libFile) )
ERROR1s( "read01Matrix", "Library block ", libName,
" not found in specified library.")
Expand Down
5 changes: 4 additions & 1 deletion src/leon/src/readgrp.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,11 @@ PermGroup *readPermGroup(
TokenType terminator;
char attribute[MAX_NAME_LENGTH+1];
char inputBuffer[81];
char *rv;

RandomSchreierOptions rOptions = {0,UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN,
UNKNOWN,UNKNOWN,UNKNOWN,UNKNOWN};

/* Attempt to open library file. */
libFile = fopen( libFileName, "r");
if ( libFile == NULL )
Expand Down Expand Up @@ -333,7 +336,7 @@ PermGroup *readPermGroup(
not found. */
rewind( libFile);
for (;;) {
fgets( inputBuffer, 80, libFile);
rv = fgets( inputBuffer, 80, libFile);
if ( feof(libFile) )
ERROR1s( "readPermGroup", "Library block ", libName,
" not found in specified library.")
Expand Down
3 changes: 2 additions & 1 deletion src/leon/src/readpar.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Partition *readPartition(
Token token, saveToken;
char inputBuffer[81];
FILE *libFile;
char *rv;

/* Open input file. */
libFile = fopen( libFileName, "r");
Expand All @@ -47,7 +48,7 @@ Partition *readPartition(
not found. */
rewind( libFile);
for (;;) {
fgets( inputBuffer, 80, libFile);
rv = fgets( inputBuffer, 80, libFile);
if ( feof(libFile) )
ERROR1s( "readPartition", "Library block ", libName,
" not found in specified library.")
Expand Down
5 changes: 3 additions & 2 deletions src/leon/src/readper.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ Permutation *readPermutation(
Token token, saveToken;
char inputBuffer[81];
FILE *libFile;

char *rv;

/* Open input file. */
libFile = fopen( libFileName, "r");
if ( libFile == NULL )
Expand All @@ -50,7 +51,7 @@ Permutation *readPermutation(
not found. */
rewind( libFile);
for (;;) {
fgets( inputBuffer, 80, libFile);
rv = fgets( inputBuffer, 80, libFile);
if ( feof(libFile) )
ERROR1s( "readPermutation", "Library block ", libName,
" not found in specified library.")
Expand Down
5 changes: 3 additions & 2 deletions src/leon/src/readpts.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ PointSet *readPointSet(
Token token, saveToken;
char inputBuffer[81];
FILE *libFile;

char *rv;

/* Open input file. */
libFile = fopen( libFileName, "r");
if ( libFile == NULL )
Expand All @@ -48,7 +49,7 @@ PointSet *readPointSet(
not found. */
rewind( libFile);
for (;;) {
fgets( inputBuffer, 80, libFile);
rv = fgets( inputBuffer, 80, libFile);
if ( feof(libFile) )
ERROR1s( "readPointSet", "Library block ", libName,
" not found in specified library.")
Expand Down

0 comments on commit 42e3119

Please sign in to comment.