Record Detail

Compile Error

/in/main.c: In function 'main':
/in/main.c:34:14: error: unused variable 'winner' [-Werror=unused-variable]
    country_t winner=game(teams4[1],teams4[2],k);
              ^~~~~~
/in/main.c:12:4: error: 'seed' is used uninitialized in this function [-Werror=uninitialized]
    srand(seed);
    ^~~~~~~~~~~
/in/main.c:32:17: error: iteration 1 invokes undefined behavior [-Werror=aggressive-loop-optimizations]
        teams4[m]=game(teams3[2*m-1],teams3[2*m],k);
        ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/main.c:31:9: note: within this loop
    while(m++<2){
         ^
/in/main.c:27:17: error: iteration 3 invokes undefined behavior [-Werror=aggressive-loop-optimizations]
        teams3[l]=game(teams2[2*l-1],teams[2*l],k);
        ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/main.c:26:9: note: within this loop
    while(l++<4){
         ^
/in/main.c:22:17: error: iteration 7 invokes undefined behavior [-Werror=aggressive-loop-optimizations]
        teams2[j]=game(teams[2*j-1],teams[2*j],k);
        ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/main.c:21:9: note: within this loop
    while(j++<8){
         ^
/in/main.c:32:18: error: array subscript is above array bounds [-Werror=array-bounds]
        teams4[m]=game(teams3[2*m-1],teams3[2*m],k);
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/main.c:32:14: error: array subscript is above array bounds [-Werror=array-bounds]
        teams4[m]=game(teams3[2*m-1],teams3[2*m],k);
        ~~~~~~^~~
/in/main.c:34:21: error: array subscript is above array bounds [-Werror=array-bounds]
    country_t winner=game(teams4[1],teams4[2],k);
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Lab 5
Language
C
Submit At
2018-06-26 14:13:05
Judged At
2018-06-26 14:13:05
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes