Record Detail

Compile Error

/in/double_list.c: In function 'push':
/in/double_list.c:11:9: error: expected ':', ',', ';', '}' or '__attribute__' before 'struct'
         struct node *next;
         ^~~~~~
/in/double_list.c:9:12: error: struct has no members [-Werror=pedantic]
     struct node_t{
            ^~~~~~
/in/double_list.c:20:1: error: expected ';', identifier or '(' before 'void'
 void deleteNode(node_t ** head_ref, node_t * del){
 ^~~~
/in/double_list.c:20:1: error: ISO C forbids nested functions [-Werror=pedantic]
/in/double_list.c: In function 'deleteNode':
/in/double_list.c:21:8: error: comparison of distinct pointer types lacks a cast [-Werror]
 if (del==head_ref) {
        ^~
/in/double_list.c:22:9: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
     del = head_ref;
         ^
/in/double_list.c:23:24: error: '*head_ref' is a pointer; did you mean to use '->'?
     head_ref = head_ref->next;
                        ^~
                        ->
/in/double_list.c:24:13: error: '*head_ref' is a pointer; did you mean to use '->'?
     head_ref->prev = Null;
             ^~
             ->
/in/double_list.c:24:22: error: 'Null' undeclared (first use in this function)
     head_ref->prev = Null;
                      ^~~~
/in/double_list.c:24:22: note: each undeclared identifier is reported only once for each function it appears in
/in/double_list.c:27:19: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
 struct node *Ptr1=head_ref
                   ^~~~~~~~
/in/double_list.c:28:1: error: expected ',' or ';' before 'while'
 while (Ptr1!=del){
 ^~~~~
/in/double_list.c:30:1: error: 'store_next' undeclared (first use in this function); did you mean 'strncat'?
 store_next=Ptr1->next;
 ^~~~~~~~~~
 strncat
/in/double_list.c:31:1: error: 'store_prev' undeclared (first use in this function); did you mean 'store_next'?
 store_prev=Ptr1->prev;
 ^~~~~~~~~~
 store_next
/in/double_list.c:32:1: error: implicit declaration of function 'delete'; did you mean 'deleteNode'? [-Werror=implicit-function-declaration]
 delete(Ptr1);
 ^~~~~~
 deleteNode
/in/double_list.c: In function 'insertAfter':
/in/double_list.c:48:26: error: 'head_ref' undeclared (first use in this function)
     if (prev_node->next==head_ref) {
                          ^~~~~~~~
/in/double_list.c:50:27: error: 'Null' undeclared (first use in this function)
         prev_node->prev = Null;
                           ^~~~
/in/double_list.c:51:18: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
         prev_node=num;
                  ^
/in/double_list.c:55:13: error: expected ',' or ';' before 'struct'
             struct node* new_node
             ^~~~~~
/in/double_list.c:58:5: error: 'store_next' undeclared (first use in this function); did you mean 'strncat'?
     store_next=Ptr1->next;
     ^~~~~~~~~~
     strncat
/in/double_list.c:59:16: error: 'new_node' undeclared (first use in this function); did you mean 'prev_node'?
     Ptr1->next=new_node;
                ^~~~~~~~
                prev_node
/in/double_list.c: In function 'append':
/in/double_list.c:66:5: error: ISO C forbids nested functions [-Werror=pedantic]
     struct node* new_node
     ^~~~~~
/in/double_list.c:67:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'struct'
     struct node *Ptr1=head_ref
     ^~~~~~
/in/double_list.c:67:23: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
     struct node *Ptr1=head_ref
                       ^~~~~~~~
/in/double_list.c:68:5: error: expected ',' or ';' before 'while'
     while (Ptr1->next!=Null)
     ^~~~~
/in/double_list.c:70:16: error: 'new_node' undeclared (first use in this function); did you mean 'new_data'?
     Ptr1->next=new_node
                ^~~~~~~~
                new_data
/in/double_list.c:71:5: error: expected ';' before 'new_node'
     new_node->prev=Ptr1;
     ^~~~~~~~
/in/double_list.c:72:20: error: 'Null' undeclared (first use in this function)
     new_node->next=Null;
                    ^~~~
/in/double_list.c:74:8: error: expected identifier or '(' before ',' token
     int, appends a new node at the end
        ^
/in/double_list.c:76:1: error: ISO C forbids nested functions [-Werror=pedantic]
 void printList(node_t* node)
 ^~~~
/in/double_list.c:84:1: 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:86:6: error: expected expression before 'node_t'
 free(node_t);
      ^~~~~~
/in/double_list.c: In function 'append':
/in/double_list.c:87:1: error: expected declaration or statement at end of input
 }
 ^
At top level:
/in/double_list.c:84:6: error: 'freeList' defined but not used [-Werror=unused-function]
 void freeList(node_t **head_ref){
      ^~~~~~~~
/in/double_list.c:76:6: error: 'printList' defined but not used [-Werror=unused-function]
 void printList(node_t* node)
      ^~~~~~~~~
/in/double_list.c:20:6: error: 'deleteNode' defined but not used [-Werror=unused-function]
 void deleteNode(node_t ** head_ref, node_t * del){
      ^~~~~~~~~~
cc1: all warnings being treated as errors

Information

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