Record Detail

Compile Error

/in/set.c: In function 'construct':
/in/set.c:15:3: error: dereferencing pointer to incomplete type 'struct set'
 s -> num = 0;
   ^~
/in/set.c:18:1: error: ISO C forbids nested functions [-Werror=pedantic]
 void destruct()
 ^~~~
/in/set.c: In function 'destruct':
/in/set.c:21:6: error: 'element' undeclared (first use in this function)
 free(element);
      ^~~~~~~
/in/set.c:21:6: note: each undeclared identifier is reported only once for each function it appears in
/in/set.c: In function 'construct':
/in/set.c:23:1: error: ISO C forbids nested functions [-Werror=pedantic]
 int in(set *s, int element)
 ^~~
/in/set.c: In function 'in':
/in/set.c:27:1: error: no return statement in function returning non-void [-Werror=return-type]
 }
 ^
/in/set.c:23:13: error: unused parameter 's' [-Werror=unused-parameter]
 int in(set *s, int element)
             ^
/in/set.c:23:20: error: unused parameter 'element' [-Werror=unused-parameter]
 int in(set *s, int element)
                    ^~~~~~~
/in/set.c: In function 'construct':
/in/set.c:28:1: error: ISO C forbids nested functions [-Werror=pedantic]
 void insert(set *s, int element)
 ^~~~
/in/set.c: In function 'insert':
/in/set.c:31:1: error: statement with no effect [-Werror=unused-value]
 element
 ^~~~~~~
/in/set.c:32:1: error: expected ';' before '}' token
 }
 ^
/in/set.c:28:18: error: unused parameter 's' [-Werror=unused-parameter]
 void insert(set *s, int element)
                  ^
/in/set.c: In function 'construct':
/in/set.c:33:1: error: ISO C forbids nested functions [-Werror=pedantic]
 void erase(set *s, int element)
 ^~~~
/in/set.c: In function 'erase':
/in/set.c:33:17: error: unused parameter 's' [-Werror=unused-parameter]
 void erase(set *s, int element)
                 ^
/in/set.c:33:24: error: unused parameter 'element' [-Werror=unused-parameter]
 void erase(set *s, int element)
                        ^~~~~~~
/in/set.c: In function 'construct':
/in/set.c:39:1: error: ISO C forbids nested functions [-Werror=pedantic]
 void print(set *s)
 ^~~~
/in/set.c: In function 'print':
/in/set.c:44:19: error: format '%lf' expects argument of type 'double', but argument 2 has type 'set {aka struct set_t}' [-Werror=format=]
         printf("%lf ",s[i]);
                 ~~^   ~~~~
/in/set.c:46:1: error: ISO C forbids nested functions [-Werror=pedantic]
 int main()
 ^~~
/in/set.c:46:5: error: 'main' is normally a non-static function [-Werror=main]
 int main()
     ^~~~
/in/set.c:61:1: error: expected declaration or statement at end of input
 }
 ^
/in/set.c: In function 'construct':
/in/set.c:61:1: error: expected declaration or statement at end of input
/in/set.c:61:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
At top level:
/in/set.c:46:5: error: 'main' defined but not used [-Werror=unused-function]
 int main()
     ^~~~
/in/set.c:23:5: error: 'in' defined but not used [-Werror=unused-function]
 int in(set *s, int element)
     ^~
cc1: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Lab7
Language
C
Submit At
2020-06-30 22:55:13
Judged At
2020-06-30 22:55:13
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes