Record Detail

Compile Error

/in/double_list.c:11:6: error: conflicting types for 'push'
 void push(struct Node** head_ref, int num) 
      ^~~~
In file included from /in/double_list.c:3:0:
/in/main/double_list.h:13:6: note: previous declaration of 'push' was here
 void push(node_t **head_ref,int num);
      ^~~~
/in/double_list.c:31:6: error: conflicting types for 'insertAfter'
 void insertAfter(struct Node* prev_node, int num) 
      ^~~~~~~~~~~
In file included from /in/double_list.c:3:0:
/in/main/double_list.h:14:6: note: previous declaration of 'insertAfter' was here
 void insertAfter(node_t* prev_node, int num);
      ^~~~~~~~~~~
/in/double_list.c:59:6: error: conflicting types for 'append'
 void append(struct Node** head_ref, int num) 
      ^~~~~~
In file included from /in/double_list.c:3:0:
/in/main/double_list.h:15:6: note: previous declaration of 'append' was here
 void append(node_t ** head_ref, int new_data);
      ^~~~~~
/in/double_list.c:94:6: error: conflicting types for 'deleteNode'
 void deleteNode(struct Node** head_ref, struct Node* del) 
      ^~~~~~~~~~
In file included from /in/double_list.c:3:0:
/in/main/double_list.h:17:6: note: previous declaration of 'deleteNode' was here
 void deleteNode(node_t ** head_ref, node_t * del);
      ^~~~~~~~~~
/in/double_list.c: In function 'printList':
/in/double_list.c:123:9: error: ISO C forbids nested functions [-Werror=pedantic]
         void freeList(node_t **head_ref){
         ^~~~
/in/double_list.c: In function 'freeList':
/in/double_list.c:125:22: error: 'list' undeclared (first use in this function); did you mean 'int'?
                 free(list);
                      ^~~~
                      int
/in/double_list.c:125:22: note: each undeclared identifier is reported only once for each function it appears in
/in/double_list.c: In function 'printList':
/in/double_list.c:126:9: error: expected declaration or statement at end of input
         }
         ^
At top level:
/in/double_list.c:123:14: error: 'freeList' defined but not used [-Werror=unused-function]
         void freeList(node_t **head_ref){
              ^~~~~~~~
cc1: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Lab 8
Language
C
Submit At
2020-07-04 09:30:59
Judged At
2020-07-04 09:30:59
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes