Fixed warnings about unused return value of fscanf, scanf and system

This commit is contained in:
Andrey Kamaev
2012-04-10 15:44:07 +00:00
parent 7fd1cfc5e7
commit c712f376d5
9 changed files with 90 additions and 42 deletions

View File

@@ -192,7 +192,9 @@ void print_variable_importance( CvDTree* dtree, const char** var_desc )
}
printf( "Print variable importance information? (y/n) " );
scanf( "%1s", input );
int values_read = scanf( "%1s", input );
CV_Assert(values_read == 1);
if( input[0] != 'y' && input[0] != 'Y' )
return;
@@ -230,7 +232,9 @@ void interactive_classification( CvDTree* dtree, const char** var_desc )
const CvDTreeNode* node;
printf( "Start/Proceed with interactive mushroom classification (y/n): " );
scanf( "%1s", input );
int values_read = scanf( "%1s", input );
CV_Assert(values_read == 1);
if( input[0] != 'y' && input[0] != 'Y' )
break;
printf( "Enter 1-letter answers, '?' for missing/unknown value...\n" );
@@ -252,7 +256,8 @@ void interactive_classification( CvDTree* dtree, const char** var_desc )
const int* map = data->cat_map->data.i + data->cat_ofs->data.i[vi];
printf( "%s: ", var_desc[vi] );
scanf( "%1s", input );
values_read = scanf( "%1s", input );
CV_Assert(values_read == 1);
if( input[0] == '?' )
{