Record Detail

Compile Error

prepare (1/3): 
finished

make (2/3): 
clang -std=gnu11 -O2 -Wall -Wextra -Werror -pedantic -Wno-unused-result -Wconversion -Wvla -o l5 *.c
clang -std=gnu11 -O2 -Wall -Wextra -Werror -pedantic -Wno-unused-result -Wconversion -Wvla -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined -fsanitize=integer -o l5_memory_check *.c
lab5_dlist.c:7:1: error: unknown type name 'list_t'
list_t* create_list(int type){
^
lab5_dlist.c:8:5: error: use of undeclared identifier 'list_t'
    list_t *list = (list_t *)malloc(sizeof(list_t));
    ^
lab5_dlist.c:8:13: error: use of undeclared identifier 'list'
    list_t *list = (list_t *)malloc(sizeof(list_t));
            ^
lab5_dlist.c:8:29: error: expected expression
    list_t *list = (list_t *)malloc(sizeof(list_t));
                            ^
lab5_dlist.c:8:21: error: use of undeclared identifier 'list_t'
    list_t *list = (list_t *)malloc(sizeof(list_t));
                    ^
lab5_dlist.clab5_dlist.c:9:9: error: use of undeclared identifier 'list'; did you mean 'link'?
    if(!list) {
        ^~~~
        link
:/usr/include/unistd.h:792:12: note: 'link' declared here
extern int link (const char *__from, const char *__to)
           ^
lab5_dlist.c:9:9: error: address of function 'link' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
    if(!list) {
       ~^~~~
7:1lab5_dlist.c:9:9: note: prefix with the address-of operator to silence this warning
    if(!list) {
        ^
        &
: error: unknown type name 'list_t'
list_t* create_list(int type){lab5_dlist.c
^
:13:5: error: use of undeclared identifier 'list'
    list->type = type; 
    ^
lab5_dlist.c:14:5: error: use of undeclared identifier 'list'
    list->size = 0;
    ^
lab5_dlist.c:15:12: error: use of undeclared identifier 'list'; did you mean 'link'?
    return list;
           ^~~~
           link
/usr/include/unistd.h:792:12: note: 'link' declared here
extern int link (const char *__from, const char *__to)
           ^
lab5_dlist.c:8:5: error: lab5_dlist.c:18:1: error: unknown type name 'list_t'
list_t* copy_list(list_t* list){
^
use of undeclared identifier 'list_t'
    list_t *list = (list_t *)malloc(sizeof(list_t));
    ^
lab5_dlist.c:18:19: error: unknown type name 'list_t'
list_t* copy_list(list_t* list){
                  ^
lab5_dlist.c:8:13: lab5_dlist.c:19:5: error: use of undeclared identifier 'list_t'; did you mean 'list'?
    list_t* new_list = create_list(list->type);
    ^~~~~~
    list
lab5_dlist.c:18:27: note: 'list' declared here
list_t* copy_list(list_t* list){
                          ^
error: use of undeclared identifier 'list'
    list_t *list = (list_t *)malloc(sizeof(list_t));
            ^
lab5_dlist.c:19:13: error: use of undeclared identifier 'new_list'
    list_t* new_list = create_list(list->type);
            ^
lab5_dlist.c:8lab5_dlist.c:20:5: error: unknown type name 'node_t'; did you mean 'mode_t'?
    node_t* current = list->head;
    ^~~~~~
    mode_t
/usr/include/x86_64-linux-gnu/sys/types.h:70:18: note: 'mode_t' declared here
typedef __mode_t mode_t;
                 ^
:29: error: expected expression
    list_t *list = (list_t *)malloc(sizeof(list_t));
lab5_dlist.c:22:9: error: unknown type name 'node_t'; did you mean 'mode_t'?
        node_t* node = create_node(current->key, current->data);
        ^~~~~~
        mode_t
/usr/include/x86_64-linux-gnu/sys/types.h:70:18: note: 'mode_t' declared here
typedef __mode_t mode_t;
                 ^
lab5_dlist.c:22:24: error: implicit declaration of function 'create_node' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        node_t* node = create_node(current->key, current->data);
                       ^
                            ^
lab5_dlist.c:8:21: error: use of undeclared identifier 'list_t'
    list_t *list = (list_t *)malloc(sizeof(list_t));
                    ^
lab5_dlist.c:22:43: error: member reference base type 'mode_t' (aka 'unsigned int') is not a structure or union
        node_t* node = create_node(current->key, current->data);
                                   ~~~~~~~^ ~~~
lab5_dlist.c:22:57: error: member reference base type 'mode_t' (aka 'unsigned int') is not a structure or union
        node_t* node = create_node(current->key, current->data);
                                                 ~~~~~~~^ ~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
lab5_dlist.c:9:9: error: use of undeclared identifier 'list'; did you mean 'link'?
    if(!list) {
        ^~~~
        link
/usr/include/unistd.h20 errors generated.
:792:12: note: 'link' declared here
extern int link (const char *__from, const char *__to)
           ^
lab5_dlist.c:9:9: error: address of function 'link' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
    if(!list) {
       ~^~~~
lab5_dlist.c:9:9: note: prefix with the address-of operator to silence this warning
    if(!list) {
        ^
        &
lab5_dlist.c:13:5: error: use of undeclared identifier 'list'
    list->type = type; 
    ^
lab5_dlist.c:14:5: error: use of undeclared identifier 'list'
    list->size = 0;
    ^
lab5_dlist.c:15:12: error: use of undeclared identifier 'list'; did you mean 'link'?
    return list;
           ^~~~
           link
/usr/include/unistd.h:792:12: note: 'link' declared here
extern int link (const char *__from, const char *__to)
           ^
lab5_dlist.c:18:1: error: unknown type name 'list_t'
list_t* copy_list(list_t* list){
^
lab5_dlist.c:18:19: error: unknown type name 'list_t'
list_t* copy_list(list_t* list){
                  ^
lab5_dlist.c:19:5: error: use of undeclared identifier 'list_t'; did you mean 'list'?
    list_t* new_list = create_list(list->type);
    ^~~~~~
    list
lab5_dlist.c:18:27: note: 'list' declared here
list_t* copy_list(list_t* list){
                          ^
lab5_dlist.c:19:13: error: use of undeclared identifier 'new_list'
    list_t* new_list = create_list(list->type);
            ^
lab5_dlist.c:20:5: error: unknown type name 'node_t'; did you mean 'mode_t'?
    node_t* current = list->head;
    ^~~~~~
    mode_t
/usr/include/x86_64-linux-gnu/sys/types.h:70:18: note: 'mode_t' declared here
typedef __mode_t mode_t;
                 ^
lab5_dlist.c:22:9: error: unknown type name 'node_t'; did you mean 'mode_t'?
        node_t* node = create_node(current->key, current->data);
        ^~~~~~
        mode_t
/usr/include/x86_64-linux-gnu/sys/types.h:70:18: note: 'mode_t' declared here
typedef __mode_t mode_t;
                 ^
lab5_dlist.c:22:24: error: implicit declaration of function 'create_node' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        node_t* node = create_node(current->key, current->data);
                       ^
lab5_dlist.c:22:43: error: member reference base type 'mode_t' (aka 'unsigned int') is not a structure or union
        node_t* node = create_node(current->key, current->data);
                                   ~~~~~~~^ ~~~
lab5_dlist.c:22:57: error: member reference base type 'mode_t' (aka 'unsigned int') is not a structure or union
        node_t* node = create_node(current->key, current->data);
                                                 ~~~~~~~^ ~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
Makefile:13: recipe for target 'l5' failed
make: *** [l5] Error 1
make: *** Waiting for unfinished jobs....
Makefile:16: recipe for target 'l5_memory_check' failed
make: *** [l5_memory_check] Error 1

build failed

Information

Submit By
Type
Submission
Homework
l5
Language
GNU Make
Submit At
2023-11-06 18:31:19
Judged At
2023-11-06 18:31:19
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes