Fixed warnings about unused return value of fscanf, scanf and system
This commit is contained in:
@@ -273,7 +273,8 @@ int main(int argc, char** argv)
|
||||
if( dir[dir.size()-1] != '\\' && dir[dir.size()-1] != '/' )
|
||||
dir += "/";
|
||||
|
||||
system(("mkdir " + dir).c_str());
|
||||
int result = system(("mkdir " + dir).c_str());
|
||||
CV_Assert(result == 0);
|
||||
|
||||
for( int i = 0; ddms[i*4] != 0; i++ )
|
||||
{
|
||||
|
@@ -82,7 +82,8 @@ int main(int argc, char** argv)
|
||||
sprintf(test_file, "%s", argv[1]);
|
||||
f = fopen(test_file, "r");
|
||||
char vid[20];
|
||||
fscanf(f, "%s\n", vid);
|
||||
int values_read = fscanf(f, "%s\n", vid);
|
||||
CV_Assert(values_read == 1);
|
||||
cout << "Benchmarking against " << vid << endl;
|
||||
live = 0;
|
||||
}
|
||||
@@ -133,7 +134,8 @@ int main(int argc, char** argv)
|
||||
}
|
||||
else
|
||||
{
|
||||
fscanf(f, "%d %f %f %f %f\n", &i, &w[0], &w[1], &w[2], &w[3]);
|
||||
int values_read = fscanf(f, "%d %f %f %f %f\n", &i, &w[0], &w[1], &w[2], &w[3]);
|
||||
CV_Assert(values_read == 5);
|
||||
sprintf(img_file, "seqG/%04d.png", i);
|
||||
image = imread(img_file, CV_LOAD_IMAGE_COLOR);
|
||||
if (image.empty())
|
||||
|
@@ -491,7 +491,8 @@ int main(int argc, char** argv)
|
||||
if( outbarename )
|
||||
{
|
||||
cmd[6 + outbarename - outprefix] = '\0';
|
||||
system(cmd);
|
||||
int result = system(cmd);
|
||||
CV_Assert(result == 0);
|
||||
outbarename++;
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user