Record Detail

Compile Error

/in/rational.c: In function 'reduce':
/in/rational.c:8:26: error: unused parameter 'a' [-Werror=unused-parameter]
 void reduce(RationalInt *a)
                          ^
/in/rational.c: In function 'set':
/in/rational.c:13:23: error: unused parameter 'a' [-Werror=unused-parameter]
 void set(RationalInt *a, int num, int den)
                       ^
/in/rational.c:13:30: error: unused parameter 'num' [-Werror=unused-parameter]
 void set(RationalInt *a, int num, int den)
                              ^~~
/in/rational.c:13:39: error: unused parameter 'den' [-Werror=unused-parameter]
 void set(RationalInt *a, int num, int den)
                                       ^~~
/in/rational.c: In function 'add':
/in/rational.c:20:11: error: invalid operands to binary + (have 'RationalInt * {aka struct rational_t *}' and 'RationalInt {aka const struct rational_t}')
     *a = a+b;
           ^
/in/rational.c: In function 'subtract':
/in/rational.c:27:11: error: invalid operands to binary - (have 'RationalInt * {aka struct rational_t *}' and 'RationalInt {aka const struct rational_t}')
     *a = a-b;
           ^
/in/rational.c: In function 'multiply':
/in/rational.c:32:11: error: invalid operands to binary * (have 'RationalInt * {aka struct rational_t *}' and 'RationalInt {aka const struct rational_t}')
     *a = a*b;
           ^
/in/rational.c: In function 'divide':
/in/rational.c:37:11: error: invalid operands to binary / (have 'RationalInt * {aka struct rational_t *}' and 'RationalInt {aka const struct rational_t}')
     *a = a/b;
           ^
cc1: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Lab 10
Language
C
Submit At
2020-07-17 14:19:34
Judged At
2020-07-17 14:19:34
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes