Record Detail

Accepted

prepare (1/3): 
finished

make (2/3): 
gcc  -o main prime.c  -lgmp -lm
prime.c: In function 'Prime':
prime.c:89:49: warning: passing argument 4 of 'qsort' from incompatible pointer type [-Wincompatible-pointer-types]
         qsort(node, vSize, sizeof(struct Node), Compn);
                                                 ^~~~~
In file included from prime.c:2:0:
/usr/include/stdlib.h:827:13: note: expected '__compar_fn_t {aka int (*)(const void *, const void *)}' but argument is of type 'int (*)(const struct Node *, const struct Node *)'
 extern void qsort (void *__base, size_t __nmemb, size_t __size,
             ^~~~~
prime.c:139:45: warning: passing argument 4 of 'qsort' from incompatible pointer type [-Wincompatible-pointer-types]
     qsort(node, vSize, sizeof(struct Node), Compp);
                                             ^~~~~
In file included from prime.c:2:0:
/usr/include/stdlib.h:827:13: note: expected '__compar_fn_t {aka int (*)(const void *, const void *)}' but argument is of type 'int (*)(const struct Node *, const struct Node *)'
 extern void qsort (void *__base, size_t __nmemb, size_t __size,
             ^~~~~
prime.c:141:16: warning: too many arguments for format [-Wformat-extra-args]
         printf("%d--%d\n", node[i].parent,node[i].self, node[i].a);
                ^~~~~~~~~~
finished

clean (3/3): 
finished

all task finished, build successfully
# Status Time Cost Memory Cost
#1 Accepted Detail 1ms 252.0 KiB
#2 Accepted Detail 1ms 216.0 KiB
#3 Accepted Detail 1ms 252.0 KiB
#4 Accepted Detail 1ms 264.0 KiB
#5 Accepted Detail 1ms 216.0 KiB

Information

Submit By
Type
Submission
Homework
Lab 2
Language
GNU Make
Submit At
2019-09-24 21:12:27
Judged At
2019-09-24 21:12:27
Judged By
Score
100
Total Time
5ms
Peak Memory
264.0 KiB