Record Detail

Compile Error

/in/main.c: In function 'main':
/in/main.c:17:5: error: this 'for' clause does not guard... [-Werror=misleading-indentation]
     for (i = 1; i <= 4; i++)
     ^~~
/in/main.c:19:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
         scanf("%s %d", country2, &rank2);
         ^~~~~
/in/main.c:25:9: error: this 'else' clause does not guard... [-Werror=misleading-indentation]
         else
         ^~~~
/in/main.c:27:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
             countrywin1 = country2;
             ^~~~~~~~~~~
/in/main.c:28:9: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
         if (rank3 <rank4)
         ^~
/in/main.c:30:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
             countrywin2 = country3;
             ^~~~~~~~~~~
/in/main.c:31:9: error: 'else' without a previous 'if'
         else
         ^~~~
/in/main.c:34:13: error: expected expression before ')' token
         if ()
             ^
/in/main.c:12:11: error: variable 'countrywin2' set but not used [-Werror=unused-but-set-variable]
     char* countrywin2 = "0";
           ^~~~~~~~~~~
/in/main.c:11:11: error: variable 'countrywin1' set but not used [-Werror=unused-but-set-variable]
     char* countrywin1 = "0";
           ^~~~~~~~~~~
/in/main.c:16:5: error: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Werror=unused-result]
     scanf("%d %d", &seed, &k);
     ^~~~~~~~~~~~~~~~~~~~~~~~~
/in/main.c:18:9: error: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Werror=unused-result]
         scanf("%s %d", country1, &rank1);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/main.c:19:9: error: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Werror=unused-result]
         scanf("%s %d", country2, &rank2);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/main.c:20:9: error: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Werror=unused-result]
         scanf("%s %d", country3, &rank3);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/main.c:21:9: error: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Werror=unused-result]
         scanf("%s %d", country4, &rank4);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Lab 5
Language
C
Submit At
2018-06-26 19:53:03
Judged At
2018-06-26 21:07:56
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes