Record Detail

Runtime Error

/in/database.c: In function 'print_select':
/in/database.c:76:50: warning: unused parameter 'tablename' [-Wunused-parameter]
 void print_select(Select_table *selectTable,char tablename[]) {
                                                  ^~~~~~~~~
/in/database.c: In function 'select':
/in/database.c:149:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (int j = 0; j < strlen(db->tables[loc].assignments[i].course); j++) {
                               ^
/in/database.c:152:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (int j = 0; j < strlen(db->tables[loc].assignments[i].name); j++) {
                               ^
/in/database.c:162:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for (int j = 0; j < strlen(db->tables[loc].assignments[i].course); j++) {
                                   ^
/in/database.c:165:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for (int j = 0; j < strlen(db->tables[loc].assignments[i].name); j++) {
                                   ^
/in/database.c:176:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for (int j = 0; j < strlen(db->tables[loc].assignments[i].course); j++) {
                                   ^
/in/database.c:179:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for (int j = 0; j < strlen(db->tables[loc].assignments[i].name); j++) {
                                   ^
/in/database.c:191:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for (int j = 0; j < strlen(db->tables[loc].assignments[i].course); j++) {
                                   ^
/in/database.c:194:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for (int j = 0; j < strlen(db->tables[loc].assignments[i].name); j++) {
                                   ^
/in/database.c: In function 'move':
/in/database.c:345:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int j = 0; j < strlen(db->tables[loc].assignments[i + 1].course); j++) {
                           ^
/in/database.c:348:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int j = 0; j < strlen(db->tables[loc].assignments[i + 1].name); j++) {
                           ^
/in/database.c: In function 'delete':
/in/database.c:364:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (int j = 0; j < strlen(db->tables[loc].assignments[i].course); j++) {
                               ^
/in/database.c:367:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (int j = 0; j < strlen(db->tables[loc].assignments[i].name); j++) {
                               ^
/in/database.c:379:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for (int j = 0; j < strlen(db->tables[loc].assignments[i].course); j++) {
                                   ^
/in/database.c:382:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for (int j = 0; j < strlen(db->tables[loc].assignments[i].name); j++) {
                                   ^
/in/database.c:396:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for (int j = 0; j < strlen(db->tables[loc].assignments[i].course); j++) {
                                   ^
/in/database.c:399:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for (int j = 0; j < strlen(db->tables[loc].assignments[i].name); j++) {
                                   ^
/in/database.c:413:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for (int j = 0; j < strlen(db->tables[loc].assignments[i].course); j++) {
                                   ^
/in/database.c:416:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for (int j = 0; j < strlen(db->tables[loc].assignments[i].name); j++) {
                                   ^
/in/database.c: In function 'main':
/in/database.c:569:9: warning: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
         gets(str);
         ^~~~
         fgets
/in/database.c: In function 'print':
/in/database.c:67:56: warning: 'loc' may be used uninitialized in this function [-Wmaybe-uninitialized]
     qsort(&db->tables[loc].assignments, db->tables[loc].assignNum, sizeof(db->tables[loc].assignments[0]), Comp_ddl);
                                         ~~~~~~~~~~~~~~~^~~~~~~~~~
/in/database.c: In function 'save':
/in/database.c:90:9: warning: 'loc' may be used uninitialized in this function [-Wmaybe-uninitialized]
     int loc;
         ^~~
/in/database.c: In function 'insert':
/in/database.c:132:72: warning: 'loc' may be used uninitialized in this function [-Wmaybe-uninitialized]
         db->tables[loc].assignments[db->tables[loc].assignNum].name[i] = name[i];
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/in/database.c: In function 'select':
/in/database.c:160:44: warning: 'loc' may be used uninitialized in this function [-Wmaybe-uninitialized]
         for (int i = 0; i < db->tables[loc].assignNum; i++) {
                             ~~~~~~~~~~~~~~~^~~~~~~~~~
/in/database.c: In function 'update':
/in/database.c:307:44: warning: 'loc' may be used uninitialized in this function [-Wmaybe-uninitialized]
         for (int i = 0; i < db->tables[loc].assignNum; i++) {
                             ~~~~~~~~~~~~~~~^~~~~~~~~~
/in/database.c: In function 'move':
/in/database.c:340:9: warning: 'loc' may be used uninitialized in this function [-Wmaybe-uninitialized]
     int loc;
         ^~~
/in/database.c: In function 'delete':
/in/database.c:410:44: warning: 'loc' may be used uninitialized in this function [-Wmaybe-uninitialized]
         for (int i = 0; i < db->tables[loc].assignNum; i++) {
                             ~~~~~~~~~~~~~~~^~~~~~~~~~
/tmp/ccpAMoKn.o: In function `main':
database.c:(.text.startup+0x1c9): warning: the `gets' function is dangerous and should not be used.
# Status Time Cost Memory Cost
#1 Runtime Error (1) Detail 27ms 7.492 MiB
#2 Runtime Error (1) Detail 28ms 7.488 MiB
#3 Runtime Error (1) Detail 27ms 7.453 MiB
#4 Runtime Error (1) Detail 28ms 7.5 MiB
#5 Runtime Error (1) Detail 27ms 7.461 MiB
#6 Runtime Error (1) Detail 27ms 7.484 MiB
#7 Runtime Error (1) Detail 27ms 7.516 MiB
#8 Runtime Error (1) Detail 27ms 7.465 MiB
#9 Runtime Error (1) Detail 27ms 7.516 MiB
#10 Runtime Error (1) Detail 28ms 7.488 MiB

Information

Submit By
Type
Submission
Homework
Lab 5 (TEST ONLY) (+AUTO)
Language
C
Submit At
2021-11-17 10:08:50
Judged At
2021-11-21 15:06:48
Judged By
Score
0
Total Time
278ms
Peak Memory
7.516 MiB