mirror of
https://github.com/lammertb/libcrc.git
synced 2025-10-14 01:59:00 +08:00
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:
@@ -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 ) {
|
||||
|
Reference in New Issue
Block a user