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 ex3 *.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 ex3_memory_check *.c
ex2_model.c:112:42: error: implicit conversion turns floating-point number into integer: 'double' to 'int' [-Werror,-Wfloat-conversion]
    return *(double *)(((Node*)a)->data) - *(double *)(((Node*)b)->data);
    ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ex2_model.c:115:42: error: implicit conversion turns floating-point number into integer: 'double' to 'int' [-Werror,-Wfloat-conversion]
    return *(double *)(((Node*)b)->data) - *(double *)(((Node*)a)->data);
    ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ex2_model.c:132:14: error: ex2_model.cvariable length array used [-Werror,-Wvla]
:112:42: error: implicit conversion turns floating-point number into integer: 'double' to 'int' [-Werror,-Wfloat-conversion]
    Node *src[list->length];
             ^
    return *(double *)(((Node*)a)->data) - *(double *)(((Node*)b)->data);
    ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ex2_model.c:115:42: error: implicit conversion turns floating-point number into integer: 'double' to 'int' [-Werror,-Wfloat-conversion]
    return *(double *)(((Node*)b)->data) - *(double *)(((Node*)a)->data);
    ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ex2_model.c:132:14: error: variable length array used [-Werror,-Wvla]
    Node *src[list->length];
             ^
ex2_model.c:263:11: error: implicit conversion loses integer precision: 'time_t' (aka 'long') to 'unsigned int' [-Werror,-Wshorten-64-to-32]
    srand(time(NULL));
    ~~~~~ ^~~~~~~~~~
ex2_model.c:263:11: error: implicit conversion loses integer precision: 'time_t' (aka 'long') to 'unsigned int' [-Werror,-Wshorten-64-to-32]
    srand(time(NULL));
    ~~~~~ ^~~~~~~~~~
4 errors generated.
4 errors generated.
Makefile:13: recipe for target 'ex3' failed
make: *** [ex3] Error 1
make: *** Waiting for unfinished jobs....
Makefile:16: recipe for target 'ex3_memory_check' failed
make: *** [ex3_memory_check] Error 1

build failed

Information

Submit By
Type
Submission
Homework
h3
Language
GNU Make
Submit At
2023-11-05 10:17:00
Judged At
2023-11-05 10:17:00
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes