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:33:15: error: assigning to 'char *' from 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
node->key = key;
^ ~~~
lab5_dlist.c:54:54: error: use of GNU empty initializer extension [-Werror,-Wgnu-empty-initializer]
int (*const cmp[3][3])(const void *, const void *) = {
^
lab5_dlist.c:56:2: error: expected ';' after top level declarator
}
^
;
lab5_dlist.c:61:12: error: variable length array used [-Werror,-Wvla]
Node *s[((List *)this)->length];
^
lab5_dlist.c:72:27: error: called object type 'int (*const [3][3])(const void *, const void *)' is not a function or function pointer
while(j>=0 && (cmp(s[j], temp, ((List *)this)->type,method) >= 0)){
~~~^
lab5_dlist.c:58:40: error: unused parameter 'listDst' [-Werror,-Wunused-parameter]
void dlistSort(dlist_const this, dlist listDst, dlistSortMethod method){
^
lab5_dlist.c:87:81: error: format specifies type 'int' but the argument has type 'dlistValue' (aka 'union dlistValue_t') [-Werror,-Wformat]
if(((List *)this)->type == DLIST_INT) printf("%s=%d\n", nodeindex->key, nodeindex->value);
~~ ^~~~~~~~~~~~~~~~
lab5_dlist.c:88:90: error: format specifies type 'double' but the argument has type 'dlistValue' (aka 'union dlistValue_t') [-Werror,-Wformat]
else if(((List *)this)->type == DLIST_DOUBLE) printf("%s=%lf\n", nodeindex->key, nodeindex->value);
~~~ ^~~~~~~~~~~~~~~~
lab5_dlist.c:89:48: error: format specifies type 'char *' but the argument has type 'dlistValue' (aka 'union dlistValue_t') [-Werror,-Wformat]
else printf("%s=%s\n", nodeindex->key, nodeindex->value);
~~ ^~~~~~~~~~~~~~~~
lab5_dlist.c:101:2: error: no newline at end of file [-Werror,-Wnewline-eof]
}
^
10 errors generated.
lab5_dlist.c:33:15: error: assigning to 'char *' from 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
node->key = key;
^ ~~~
lab5_dlist.c:54:54: error: use of GNU empty initializer extension [-Werror,-Wgnu-empty-initializer]
int (*const cmp[3][3])(const void *, const void *) = {
^
lab5_dlist.c:56:2: error: expected ';' after top level declarator
}
^
;
lab5_dlist.c:61:12: error: variable length array used [-Werror,-Wvla]
Node *s[((List *)this)->length];
^
lab5_dlist.c:72:27: error: called object type 'int (*const [3][3])(const void *, const void *)' is not a function or function pointer
while(j>=0 && (cmp(s[j], temp, ((List *)this)->type,method) >= 0)){
~~~^
lab5_dlist.c:58:40: error: unused parameter 'listDst' [-Werror,-Wunused-parameter]
void dlistSort(dlist_const this, dlist listDst, dlistSortMethod method){
^
lab5_dlist.c:87:81: error: format specifies type 'int' but the argument has type 'dlistValue' (aka 'union dlistValue_t') [-Werror,-Wformat]
if(((List *)this)->type == DLIST_INT) printf("%s=%d\n", nodeindex->key, nodeindex->value);
~~ ^~~~~~~~~~~~~~~~
lab5_dlist.c:88:90: error: format specifies type 'double' but the argument has type 'dlistValue' (aka 'union dlistValue_t') [-Werror,-Wformat]
else if(((List *)this)->type == DLIST_DOUBLE) printf("%s=%lf\n", nodeindex->key, nodeindex->value);
~~~ ^~~~~~~~~~~~~~~~
lab5_dlist.c:89:48: error: format specifies type 'char *' but the argument has type 'dlistValue' (aka 'union dlistValue_t') [-Werror,-Wformat]
else printf("%s=%s\n", nodeindex->key, nodeindex->value);
~~ ^~~~~~~~~~~~~~~~
lab5_dlist.c:101:2: error: no newline at end of file [-Werror,-Wnewline-eof]
}
^
10 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