Fixes fgets() return value is never used. On gcc 5.4.0, causes a compile error because warnings are treated as errors in the default Makefile. Otherwise, need -Wno-unused-result to compile on gcc 5.4.0

This commit is contained in:
Paul Garver
2017-07-07 09:10:51 -04:00
parent 85756a691a
commit 4405a35a17

View File

@@ -99,7 +99,10 @@ int main( int argc, char *argv[] ) {
if ( do_ascii || do_hex ) {
printf( "Input: " );
fgets( input_string, MAX_STRING_SIZE-1, stdin );
if( fgets( input_string, MAX_STRING_SIZE-1, stdin ) == NULL ){
// Print the error
perror("Error");
}
}
if ( do_ascii ) {