Record Detail

Runtime Error

/in/database.c: In function 'is_in':
/in/database.c:9:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     while (i < strlen(s) && j < strlen(c)) {
              ^
/in/database.c:9:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     while (i < strlen(s) && j < strlen(c)) {
                               ^
/in/database.c:17:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if (j == strlen(c)) { //如果匹配成功
               ^~
/in/database.c: In function 'List':
/in/database.c:51:52: warning: passing argument 4 of 'qsort' from incompatible pointer type [-Wincompatible-pointer-types]
     qsort(db->tables, db->tableNum, sizeof(Table), compare_tables);
                                                    ^~~~~~~~~~~~~~
In file included from /in/database.c:3:0:
/usr/include/stdlib.h:827:13: note: expected '__compar_fn_t {aka int (*)(const void *, const void *)}' but argument is of type 'int (*)(Table *, Table *) {aka int (*)(struct <anonymous> *, struct <anonymous> *)}'
 extern void qsort (void *__base, size_t __nmemb, size_t __size,
             ^~~~~
/in/database.c: In function 'Load':
/in/database.c:73:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (int ii = 0; ii < strlen(buf); ii++) {
                                 ^
/in/database.c: In function 'EXE':
/in/database.c:469:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int i = 0; i < strlen(command); i++) {
                           ^
/in/database.c:485:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int i = 0; i < strlen(command); i++) {
                           ^
/in/database.c:500:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int i = 0; i < strlen(command); i++) {
                           ^
/in/database.c:513:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int ii = 0; ii < strlen(command); ii++) {
                             ^
/in/database.c:542:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int ii = 0; ii < strlen(command); ii++) {
                             ^
/in/database.c:537:24: warning: unused variable 'num' [-Wunused-variable]
         int judge = 0, num;
                        ^~~
/in/database.c:565:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int ii = 0; ii < strlen(command); ii++) {
                             ^
/in/database.c:581:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int ii = 0; ii < strlen(command); ii++) {
                             ^
/in/database.c:601:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int i = 0; i < strlen(command); i++) {
                           ^
/in/database.c: In function 'main':
/in/database.c:631:9: warning: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
         gets(command);
         ^~~~
         fgets
/in/database.c: In function 'EXE':
/in/database.c:468:13: warning: 'position' may be used uninitialized in this function [-Wmaybe-uninitialized]
         int position;
             ^~~~~~~~
/in/database.c:499:13: warning: 'position' may be used uninitialized in this function [-Wmaybe-uninitialized]
         int position;
             ^~~~~~~~
/in/database.c:600:13: warning: 'position1' may be used uninitialized in this function [-Wmaybe-uninitialized]
         int position1;
             ^~~~~~~~~
/tmp/ccc9PUrG.o: In function `main':
database.c:(.text.startup+0x158): warning: the `gets' function is dangerous and should not be used.
# Status Time Cost Memory Cost
#1 Runtime Error (1) Detail 47ms 7.52 MiB
#2 Runtime Error (1) Detail 46ms 7.48 MiB
#3 Runtime Error (1) Detail 46ms 7.465 MiB
#4 Runtime Error (1) Detail 46ms 7.457 MiB
#5 Runtime Error (1) Detail 46ms 7.473 MiB
#6 Runtime Error (1) Detail 46ms 7.488 MiB
#7 Runtime Error (1) Detail 46ms 7.488 MiB
#8 Runtime Error (1) Detail 47ms 7.484 MiB
#9 Runtime Error (1) Detail 47ms 7.508 MiB
#10 Runtime Error (1) Detail 46ms 7.551 MiB

Information

Submit By
Type
Submission
Homework
Lab 5 (TEST ONLY) (+AUTO)
Language
C
Submit At
2021-11-15 19:44:58
Judged At
2021-11-21 15:06:30
Judged By
Score
0
Total Time
468ms
Peak Memory
7.551 MiB