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:5:27: error: typedef redefinition with different types ('struct dlistNode *' vs 'void *')
typedef struct dlistNode* dlist;
^
./lab5_dlist.h:29:15: note: previous definition is here
typedef void *dlist;
^
lab5_dlist.c:14:21: error: implicit declaration of function 'readFromFile' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
dlist my_list = readFromFile(argv[1]);
^
lab5_dlist.c:14:11: error: incompatible integer to pointer conversion initializing 'dlist' (aka 'void *') with an expression of type 'int' [-Werror,-Wint-conversion]
dlist my_list = readFromFile(argv[1]);
^ ~~~~~~~~~~~~~~~~~~~~~
lab5_dlist.c:21:41: error: implicit declaration of function 'get_sort_method' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
enum dlistSortMethod_t sortMethod = get_sort_method(argv[2]);
^
lab5_dlist.c:5:27: error: typedef redefinition with different types ('struct dlistNode *' vs 'void *')
typedef struct dlistNode* dlist;
^
./lab5_dlist.h:29:15: note: previous definition is here
typedef void *dlist;lab5_dlist.c:21:41: error: implicit conversion changes signedness: 'int' to 'enum dlistSortMethod_t' [-Werror,-Wsign-conversion]
enum dlistSortMethod_t sortMethod = get_sort_method(argv[2]);
~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~
^
lab5_dlist.c:14lab5_dlist.c:52:19: error: must use 'enum' tag to refer to type 'dlistValueType_t'
dlist createDlist(dlistValueType_t type){
^
enum
:lab5_dlist.c21:54:58: error: invalid application of 'sizeof' to an incomplete type 'struct dlistNode'
struct dlistNode *node = (struct dlistNode *) malloc(sizeof(struct dlistNode));
^ ~~~~~~~~~~~~~~~~~~
lab5_dlist.c:5:16: note: forward declaration of 'struct dlistNode'
typedef struct dlistNode* dlist;
^
lab5_dlist.c:55:9: error: incomplete definition of type 'struct dlistNode'
node->type = type;
~~~~^
lab5_dlist.c:5:16: note: forward declaration of 'struct dlistNode'
typedef struct dlistNode* dlist;
^
lab5_dlist.c:56:9: error: incomplete definition of type 'struct dlistNode'
node->key = NULL;
~~~~^
lab5_dlist.c:5:16: note: forward declaration of 'struct dlistNode'
typedef struct dlistNode* dlist;
^
lab5_dlist.c:57:9: error: incomplete definition of type 'struct dlistNode'
node->value = NULL;
~~~~^
lab5_dlist.c:5:16: note: forward declaration of 'struct dlistNode'
typedef struct dlistNode* dlist;
^
lab5_dlist.c:58:9: error: incomplete definition of type 'struct dlistNode'
node->next = NULL;
~~~~^
lab5_dlist.c:5:16: note: forward declaration of 'struct dlistNode'
typedef struct dlistNode* dlist;
^
: error: lab5_dlist.c:75:50: error: member reference base type 'void' is not a structure or union
struct dlistNode *new_node = createDlist(this->type);
~~~~^ ~~~~
lab5_dlist.c:76:13: error: incomplete definition of type 'struct dlistNode'
new_node->key = strdup(key);
~~~~~~~~^
lab5_dlist.c:5:16: note: forward declaration of 'struct dlistNode'
typedef struct dlistNode* dlist;
^
lab5_dlist.c:76:21: error: implicitly declaring library function 'strdup' with type 'char *(const char *)' [-Werror,-Wimplicit-function-declaration]
new_node->key = strdup(key);
^
lab5_dlist.c:76:21: note: include the header <string.h> or explicitly provide a declaration for 'strdup'
lab5_dlist.c:77:17: error: member reference base type 'void' is not a structure or union
switch (this->type) {
~~~~^ ~~~~
lab5_dlist.c:96:19: error: incomplete definition of type 'struct dlistNode'
while (current->next != NULL) {
~~~~~~~^
lab5_dlist.c:5:16: note: forward declaration of 'struct dlistNode'
typedef struct dlistNode* dlist;
^
lab5_dlist.c:97:26: error: incomplete definition of type 'struct dlistNode'
current = current->next;
~~~~~~~^
lab5_dlist.c:5:16: note: forward declaration of 'struct dlistNode'
typedef struct dlistNode* dlist;
^
lab5_dlist.c:101:12: error: incomplete definition of type 'struct dlistNode'
current->next = new_node;
~~~~~~~^
lab5_dlist.c:5:16: note: forward declaration of 'struct dlistNode'
typedef struct dlistNode* dlist;
^
lab5_dlist.c:102:13: error: incomplete definition of type 'struct dlistNode'
new_node->next = NULL;
~~~~~~~~^
lab5_dlist.c:5:16: note: forward declaration of 'struct dlistNode'
typedef struct dlistNode* dlist;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
implicit declaration of function 'readFromFile' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
dlist my_list = readFromFile(argv[1]);
^
20 errors generated.
lab5_dlist.c:14:11: error: incompatible integer to pointer conversion initializing 'dlist' (aka 'void *') with an expression of type 'int' [-Werror,-Wint-conversion]
dlist my_list = readFromFile(argv[1]);
^ ~~~~~~~~~~~~~~~~~~~~~
lab5_dlist.c:21:41: error: implicit declaration of function 'get_sort_method' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
enum dlistSortMethod_t sortMethod = get_sort_method(argv[2]);
^
lab5_dlist.c:21:41: error: implicit conversion changes signedness: 'int' to 'enum dlistSortMethod_t' [-Werror,-Wsign-conversion]
enum dlistSortMethod_t sortMethod = get_sort_method(argv[2]);
~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~
lab5_dlist.c:52:19: error: must use 'enum' tag to refer to type 'dlistValueType_t'
dlist createDlist(dlistValueType_t type){
^
enum
lab5_dlist.c:54:58: error: invalid application of 'sizeof' to an incomplete type 'struct dlistNode'
struct dlistNode *node = (struct dlistNode *) malloc(sizeof(struct dlistNode));
^ ~~~~~~~~~~~~~~~~~~
lab5_dlist.c:5:16: note: forward declaration of 'struct dlistNode'
typedef struct dlistNode* dlist;
^
lab5_dlist.c:55:9: error: incomplete definition of type 'struct dlistNode'
node->type = type;
~~~~^
lab5_dlist.c:5:16: note: forward declaration of 'struct dlistNode'
typedef struct dlistNode* dlist;
^
lab5_dlist.c:56:9: error: incomplete definition of type 'struct dlistNode'
node->key = NULL;
~~~~^
lab5_dlist.c:5:16: note: forward declaration of 'struct dlistNode'
typedef struct dlistNode* dlist;
^
lab5_dlist.c:57:9: error: incomplete definition of type 'struct dlistNode'
node->value = NULL;
~~~~^
lab5_dlist.c:5:16: note: forward declaration of 'struct dlistNode'
typedef struct dlistNode* dlist;
^
lab5_dlist.c:58:9: error: incomplete definition of type 'struct dlistNode'
node->next = NULL;
~~~~^
lab5_dlist.c:5:16: note: forward declaration of 'struct dlistNode'
typedef struct dlistNode* dlist;
^
lab5_dlist.c:75:50: error: member reference base type 'void' is not a structure or union
struct dlistNode *new_node = createDlist(this->type);
~~~~^ ~~~~
lab5_dlist.c:76:13: error: incomplete definition of type 'struct dlistNode'
new_node->key = strdup(key);
~~~~~~~~^
lab5_dlist.c:5:16: note: forward declaration of 'struct dlistNode'
typedef struct dlistNode* dlist;
^
lab5_dlist.c:76:21: error: implicitly declaring library function 'strdup' with type 'char *(const char *)' [-Werror,-Wimplicit-function-declaration]
new_node->key = strdup(key);
^
lab5_dlist.c:76:21: note: include the header <string.h> or explicitly provide a declaration for 'strdup'
lab5_dlist.c:77:17: error: member reference base type 'void' is not a structure or union
switch (this->type) {
~~~~^ ~~~~
lab5_dlist.c:96:19: error: incomplete definition of type 'struct dlistNode'
while (current->next != NULL) {
~~~~~~~^
lab5_dlist.c:5:16: note: forward declaration of 'struct dlistNode'
typedef struct dlistNode* dlist;
^
lab5_dlist.c:97:26: error: incomplete definition of type 'struct dlistNode'
current = current->next;
~~~~~~~^
lab5_dlist.c:5:16: note: forward declaration of 'struct dlistNode'
typedef struct dlistNode* dlist;
^
lab5_dlist.c:101:12: error: incomplete definition of type 'struct dlistNode'
current->next = new_node;
~~~~~~~^
lab5_dlist.c:5:16: note: forward declaration of 'struct dlistNode'
typedef struct dlistNode* dlist;
^
lab5_dlist.c:102:13: error: incomplete definition of type 'struct dlistNode'
new_node->next = NULL;
~~~~~~~~^
lab5_dlist.c:5:16: note: forward declaration of 'struct dlistNode'
typedef struct dlistNode* dlist;
^
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
make: *** Waiting for unfinished jobs....
Makefile:13: recipe for target 'l5' failed
make: *** [l5] Error 1
build failed