Record Detail

Accepted

/in/database.c: In function 'strfind':
/in/database.c:8:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i=0;i<strlen(lmz);i++)
                  ^
/in/database.c: In function 'list':
/in/database.c:85:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int j = 0; j < strlen(db->tables[i].name); j++) {
                           ^
/in/database.c: In function 'delete':
/in/database.c:148:10: warning: unused variable 'temp' [-Wunused-variable]
     char temp[MAX_ASSIGNMENT][MAX_NAME];
          ^~~~
/in/database.c:147:9: warning: unused variable 'm' [-Wunused-variable]
     int m = 0;
         ^
/in/database.c:146:9: warning: unused variable 'j' [-Wunused-variable]
     int j = 0;
         ^
/in/database.c:145:9: warning: unused variable 'cp' [-Wunused-variable]
     int cp[100];
         ^~
/in/database.c:144:9: warning: unused variable 'ci' [-Wunused-variable]
     int ci[100];
         ^~
/in/database.c: In function 'main':
/in/database.c:343:9: warning: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
         gets(command);
         ^~~~
         fgets
/in/database.c:349:36: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'char (*)[15]' [-Wformat=]
             sscanf(command, "LOAD %s\n", &str);
                                   ~^     ~~~~
/in/database.c: In function 'strfind':
/in/database.c:14:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
In file included from /usr/include/stdio.h:862:0,
                 from /in/database.c:1:
In function 'fgets',
    inlined from 'load' at /in/database.c:30:12:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:260:9: warning: call to '__fgets_chk_warn' declared with attribute warning: fgets called with bigger size than length of destination buffer
  return __fgets_chk_warn (__s, __bos (__s), __n, __stream);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/cccMpCQO.o: In function `main':
database.c:(.text.startup+0x406): warning: the `gets' function is dangerous and should not be used.
# Status Time Cost Memory Cost
#1 Accepted Detail 18ms 6.281 MiB
#2 Accepted Detail 20ms 6.348 MiB
#3 Accepted Detail 28ms 6.34 MiB
#4 Accepted Detail 24ms 6.477 MiB
#5 Accepted Detail 31ms 6.363 MiB
#6 Accepted Detail 32ms 6.441 MiB
#7 Accepted Detail 31ms 6.582 MiB
#8 Accepted Detail 38ms 6.449 MiB
#9 Accepted Detail 40ms 6.484 MiB
#10 Accepted Detail 36ms 6.562 MiB

Information

Submit By
Type
Submission
Homework
Lab 5 (TEST ONLY) (+AUTO)
Language
C
Submit At
2021-11-14 22:04:53
Judged At
2021-11-21 15:06:19
Judged By
Score
100
Total Time
302ms
Peak Memory
6.582 MiB