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
api_impl.c:45:13: error: assigning to 'char *' from 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
api_impl.c:45:13: error: assigning to 'char *' from 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
node->key = key;
^ ~~~
node->key = key;
^ ~~~
api_impl.c:92:1: error: control reaches end of non-void function [-Werror,-Wreturn-type]
}
^
api_impl.c:97:29: error: incompatible integer to pointer conversion passing 'dlistValueType' (aka 'enum dlistValueType_t') to parameter of type 'void *' [-Werror,-Wint-conversion]
insert(*dst, dupNode(src, type));
^~~~
api_impl.c:87:35: note: passing argument to parameter 'val' here
Node* dupNode(Node* to_dup, void* val) {
^
api_impl.c:97:10: error: incompatible pointer types passing 'Node *' (aka 'struct _Node *') to parameter of type 'Node **' (aka 'struct _Node **'); remove * [-Werror,-Wincompatible-pointer-types]
insert(*dst, dupNode(src, type));
^~~~
./list.h:11:20: note: passing argument to parameter 'head' here
void insert(Node** head, Node* node);
^
api_impl.c:92:1: error: control reaches end of non-void function [-Werror,-Wreturn-type]4 errors generated.
}
^
api_impl.c:97:29: error: incompatible integer to pointer conversion passing 'dlistValueType' (aka 'enum dlistValueType_t') to parameter of type 'void *' [-Werror,-Wint-conversion]
insert(*dst, dupNode(src, type));
^~~~
api_impl.c:87:35: note: passing argument to parameter 'val' here
Node* dupNode(Node* to_dup, void* val) {
^
api_impl.c:97:10: error: incompatible pointer types passing 'Node *' (aka 'struct _Node *') to parameter of type 'Node **' (aka 'struct _Node **'); remove * [-Werror,-Wincompatible-pointer-types]
insert(*dst, dupNode(src, type));
^~~~
./list.h:11:20: note: passing argument to parameter 'head' here
void insert(Node** head, Node* node);
^
4 errors generated.
list.c:55:17: error: implicit declaration of function 'get_val_str' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
char* val = get_val_str(it->val, data_type);
^
list.c:55:11: error: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int' [-Werror,-Wint-conversion]
char* val = get_val_str(it->val, data_type);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
list.c:56:5: error: implicitly declaring library function 'printf' with type 'int (const char *, ...)' [-Werror,-Wimplicit-function-declaration]
printf("%s=%s\n", key, val);
^
list.c:56:5: note: include the header <stdio.h> or explicitly provide a declaration for 'printf'
3 errors generated.
list.c:55:17: error: implicit declaration of function 'get_val_str' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
char* val = get_val_str(it->val, data_type);
^
list.c:55:11: error: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int' [-Werror,-Wint-conversion]
char* val = get_val_str(it->val, data_type);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
list.c:56:5: error: implicitly declaring library function 'printf' with type 'int (const char *, ...)' [-Werror,-Wimplicit-function-declaration]
printf("%s=%s\n", key, val);
^
list.c:56:5: note: include the header <stdio.h> or explicitly provide a declaration for 'printf'
3 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