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:52:9: error: variable 'next' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
    if (it->next == it->list->last) {
        ^~~~~~~~~~~~~~~~~~~~~~~~~~
dlist.c:64:16: note: uninitialized use occurs here
    it->next = next;
               ^~~~
dlist.c:52:5: note: remove the 'if' if its condition is always true
    if (it->next == it->list->last) {
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dlist.c:50:17: note: initialize the variable 'next' to silence this warning
    Node_t *next;
                ^
                 = NULL
dlist.c:109:28: error: unused parameter 'this' [-Werror,-Wunused-parameter]
void dlistSort(dlist_const this, dlist listDst, dlistSortMethod method)
                           ^
dlist.c:109:40: error: unused parameter 'listDst' [-Werror,-Wunused-parameter]
void dlistSort(dlist_const this, dlist listDst, dlistSortMethod method)
                                       ^
dlist.c:109:65: error: unused parameter 'method' [-Werror,-Wunused-parameter]
void dlistSort(dlist_const this, dlist listDst, dlistSortMethod method)
                                                                ^
dlist.c:115:10: error: unused variable 'it' [-Werror,-Wunused-variable]
    It_t it;
         ^
dlist.c:114:38: error: unused parameter 'list' [-Werror,-Wunused-parameter]
static void list_print(const List_t *list, FILE *file) {
                                     ^
dlist.c:114:50: error: unused parameter 'file' [-Werror,-Wunused-parameter]
static void list_print(const List_t *list, FILE *file) {
                                                 ^
dlist.c:125:2: error: no newline at end of file [-Werror,-Wnewline-eof]
}
 ^
dlist.c:123:22: error: unused parameter 'this' [-Werror,-Wunused-parameter]
void dlistFree(dlist this) {
                     ^
9 errors generated.
dlist.c:52:9: error: variable 'next' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
    if (it->next == it->list->last) {
        ^~~~~~~~~~~~~~~~~~~~~~~~~~
dlist.c:64:16: note: uninitialized use occurs here
    it->next = next;
               ^~~~
dlist.c:52:5: note: remove the 'if' if its condition is always true
    if (it->next == it->list->last) {
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dlist.c:50:17: note: initialize the variable 'next' to silence this warning
    Node_t *next;
                ^
                 = NULL
dlist.c:109:28: error: unused parameter 'this' [-Werror,-Wunused-parameter]
void dlistSort(dlist_const this, dlist listDst, dlistSortMethod method)
                           ^
dlist.c:109:40: error: unused parameter 'listDst' [-Werror,-Wunused-parameter]
void dlistSort(dlist_const this, dlist listDst, dlistSortMethod method)
                                       ^
dlist.c:109:65: error: unused parameter 'method' [-Werror,-Wunused-parameter]
void dlistSort(dlist_const this, dlist listDst, dlistSortMethod method)
                                                                ^
dlist.c:115:10: error: unused variable 'it' [-Werror,-Wunused-variable]
    It_t it;
         ^
dlist.c:114:38: error: unused parameter 'list' [-Werror,-Wunused-parameter]
static void list_print(const List_t *list, FILE *file) {
                                     ^
dlist.c:114:50: error: unused parameter 'file' [-Werror,-Wunused-parameter]
static void list_print(const List_t *list, FILE *file) {
                                                 ^
dlist.c:125:2: error: no newline at end of file [-Werror,-Wnewline-eof]
}
 ^
dlist.c:123:22: error: unused parameter 'this' [-Werror,-Wunused-parameter]
void dlistFree(dlist this) {
                     ^
9 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
DList Series 1
Language
GNU Make
Submit At
2021-10-28 23:57:00
Judged At
2021-10-28 23:57:00
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes