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
dlist.c:14:21: error: expected expression
        list* list = (list*) this;
                           ^
dlist.c:15:14: error: treating Unicode character <U+2212> as identifier character rather than as '-' symbol [-Werror,-Wunicode-homoglyph]
        return (list−>head == NULL);
                    ^
dlist.c:15:14: error: non-ASCII characters are not allowed outside of literals and identifiers
        return (list−>head == NULL);
                    ^
dlist.c:15:18: error: use of undeclared identifier 'head'; did you mean 'fread'?
        return (list−>head == NULL);
                      ^~~~
                      fread
/usr/include/stdio.h:646:15: note: 'fread' declared here
extern size_t fread (void *__restrict __ptr, size_t __size,
              ^
dlist.c:15:17: error: comparison of distinct pointer types ('list *' (aka 'struct List *') and 'size_t (*)(void *restrict, size_t, size_t, FILE *restrict)' (aka 'unsigned long (*)(void *restrict, unsigned long, unsigned long, struct _IO_FILE *restrict)')) [-Werror,-Wcompare-distinct-pointer-types]
        return (list−>head == NULL);
                ~~~~ ^~~~~
dlist.c:15:23: error: comparison between pointer and integer ('int' and 'void *') [-Werror]
        return (list−>head == NULL);
                ~~~~~~~~~~ ^  ~~~~
dlist.c:13:30: error: unused parameter 'this' [-Werror,-Wunused-parameter]
int dlistIsEmpty(dlist_const this) {
                             ^
dlist.c:19:22: error: expected expression
        list *list = (list *) this;
                            ^
dlist.c:18:24: error: unused parameter 'this' [-Werror,-Wunused-parameter]
void dlistAppend(dlist this, const char* key, dlistValue value) {
                       ^
dlist.c:50:9: error: use of undeclared identifier 'target'
    if (target == NULL)
        ^
dlist.c:53:27: error: use of undeclared identifier 'target'
    list* oldone = (list*)target;
                          ^
dlist.c:92:40: error: unexpected type name 'node': expected expression
    for (node* current = oldone->head; node != NULL; node = node->next) {
                                       ^
dlist.c:92:54: error: unexpected type name 'node': expected expression
    for (node* current = oldone->head; node != NULL; node = node->next) {
                                                     ^
dlist.c:92:61: error: unexpected type name 'node': expected expression
    for (node* current = oldone->head; node != NULL; node = node->next) {
                                                            ^
dlist.c:96:47: error: expected ')'
                *((int*) val) = *((int *)(node->val));
                                              ^
dlist.c:96:42: note: to match this '('
                *((int*) val) = *((int *)(node->val));
                                         ^
dlist.c:96:53: error: expected expression
                *((int*) val) = *((int *)(node->val));
                                                    ^
dlist.c:100:53: error: expected ')'
                *((double *)val) = *((double *)(node->val));
                                                    ^
dlist.c:100:48: note: to match this '('
                *((double *)val) = *((double *)(node->val));
                                               ^
dlist.c:100:59: error: expected expression
                *((double *)val) = *((double *)(node->val));
                                                          ^
dlist.c:103:45: error: unexpected type name 'node': expected expression
                val = malloc(sizeof(char) * strlen(node->val));
                                                   ^
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....
dlist.c:14:21: error: expected expression
        list* list = (list*) this;
                           ^
dlist.c:15:14: error: treating Unicode character <U+2212> as identifier character rather than as '-' symbol [-Werror,-Wunicode-homoglyph]
        return (list−>head == NULL);
                    ^
dlist.c:15:14: error: non-ASCII characters are not allowed outside of literals and identifiers
        return (list−>head == NULL);
                    ^
dlist.c:15:18: error: use of undeclared identifier 'head'; did you mean 'fread'?
        return (list−>head == NULL);
                      ^~~~
                      fread
/usr/include/stdio.h:646:15: note: 'fread' declared here
extern size_t fread (void *__restrict __ptr, size_t __size,
              ^
dlist.c:15:17: error: comparison of distinct pointer types ('list *' (aka 'struct List *') and 'size_t (*)(void *restrict, size_t, size_t, FILE *restrict)' (aka 'unsigned long (*)(void *restrict, unsigned long, unsigned long, struct _IO_FILE *restrict)')) [-Werror,-Wcompare-distinct-pointer-types]
        return (list−>head == NULL);
                ~~~~ ^~~~~
dlist.c:15:23: error: comparison between pointer and integer ('int' and 'void *') [-Werror]
        return (list−>head == NULL);
                ~~~~~~~~~~ ^  ~~~~
dlist.c:13:30: error: unused parameter 'this' [-Werror,-Wunused-parameter]
int dlistIsEmpty(dlist_const this) {
                             ^
dlist.c:19:22: error: expected expression
        list *list = (list *) this;
                            ^
dlist.c:18:24: error: unused parameter 'this' [-Werror,-Wunused-parameter]
void dlistAppend(dlist this, const char* key, dlistValue value) {
                       ^
dlist.c:50:9: error: use of undeclared identifier 'target'
    if (target == NULL)
        ^
dlist.c:53:27: error: use of undeclared identifier 'target'
    list* oldone = (list*)target;
                          ^
dlist.c:92:40: error: unexpected type name 'node': expected expression
    for (node* current = oldone->head; node != NULL; node = node->next) {
                                       ^
dlist.c:92:54: error: unexpected type name 'node': expected expression
    for (node* current = oldone->head; node != NULL; node = node->next) {
                                                     ^
dlist.c:92:61: error: unexpected type name 'node': expected expression
    for (node* current = oldone->head; node != NULL; node = node->next) {
                                                            ^
dlist.c:96:47: error: expected ')'
                *((int*) val) = *((int *)(node->val));
                                              ^
dlist.c:96:42: note: to match this '('
                *((int*) val) = *((int *)(node->val));
                                         ^
dlist.c:96:53: error: expected expression
                *((int*) val) = *((int *)(node->val));
                                                    ^
dlist.c:100:53: error: expected ')'
                *((double *)val) = *((double *)(node->val));
                                                    ^
dlist.c:100:48: note: to match this '('
                *((double *)val) = *((double *)(node->val));
                                               ^
dlist.c:100:59: error: expected expression
                *((double *)val) = *((double *)(node->val));
                                                          ^
dlist.c:103:45: error: unexpected type name 'node': expected expression
                val = malloc(sizeof(char) * strlen(node->val));
                                                   ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
Makefile:16: recipe for target 'l5_memory_check' failed
make: *** [l5_memory_check] Error 1

build failed

Information

Submit By
Type
Submission
Homework
DList Series 1
Language
GNU Make
Submit At
2021-10-29 23:52:56
Judged At
2021-10-29 23:52:56
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes