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.cdlist.c::5252::99::  errorerror: : variable 'next' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]variable 'next' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]

    if (it->next == it->list->last) {    if (it->next == it->list->last) {

        ^~~~~~~~~~~~~~~~~~~~~~~~~~        ^~~~~~~~~~~~~~~~~~~~~~~~~~

dlist.cdlist.c::6464::1616::  notenote: : uninitialized use occurs hereuninitialized use occurs here

    it->next = next;    it->next = next;

               ^~~~               ^~~~

dlist.cdlist.c::5252::55::  notenote: : remove the 'if' if its condition is always trueremove the 'if' if its condition is always true

    if (it->next == it->list->last) {    if (it->next == it->list->last) {

    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

dlist.c:dlist.c50::5017::17 :note : noteinitialize the variable 'next' to silence this warning: 
initialize the variable 'next' to silence this warning
    Node_t *next;    Node_t *next;

                ^                ^

                 = NULL                 = 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]
dlist.c:109:28: errorvoid dlistSort(dlist_const this, dlist listDst, dlistSortMethod method): 
unused parameter 'this' [-Werror,-Wunused-parameter]                                       ^

dlist.c:109:65: error: unused parameter 'method' [-Werror,-Wunused-parameter]
void dlistSort(dlist_const this, dlist listDst, dlistSortMethod method)
                           ^
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]
dlist.c:115:10: error: unused variable 'it' [-Werror,-Wunused-variable]
    It_t it;void dlistSort(dlist_const this, dlist listDst, dlistSortMethod method)

         ^                                                                ^

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]
dlist.c:115:10: error: unused variable 'it' [-Werror,-Wunused-variable]
static void list_print(const List_t *list, FILE *file) {
                                                 ^
    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) {
                     ^
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) {
                     ^
99 error errorss generated 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-29 00:00:06
Judged At
2021-10-29 00:00:06
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes