Record Detail

Runtime Error

/in/database.c: In function 'Update':
/in/database.c:144:11: warning: variable 'cmd' set but not used [-Wunused-but-set-variable]
     char *cmd;
           ^~~
/in/database.c: In function 'Delete':
/in/database.c:265:11: warning: variable 'cmd' set but not used [-Wunused-but-set-variable]
     char *cmd;
           ^~~
/in/database.c: In function 'Select':
/in/database.c:350:11: warning: variable 'cmd' set but not used [-Wunused-but-set-variable]
     char *cmd;
           ^~~
/in/database.c: In function 'Load':
/in/database.c:468:11: warning: variable 'cmd' set but not used [-Wunused-but-set-variable]
     char *cmd;
           ^~~
/in/database.c: In function 'Save_Print':
/in/database.c:547:17: warning: unused variable 'pass' [-Wunused-variable]
     Assignment* pass = &ptable->assignments[assignNum];
                 ^~~~
/in/database.c:534:9: warning: unused variable 'j' [-Wunused-variable]
     int j = 0;
         ^
/in/database.c:527:11: warning: unused variable 's' [-Wunused-variable]
     char *s = malloc(121);
           ^
/in/database.c:523:11: warning: variable 'cmd' set but not used [-Wunused-but-set-variable]
     char *cmd;
           ^~~
/in/database.c: In function 'Insert':
/in/database.c:613:11: warning: unused variable 'nameCmp' [-Wunused-variable]
     char* nameCmp = (char *) &db->tables[0].name;
           ^~~~~~~
/in/database.c:602:9: warning: unused variable 'flag' [-Wunused-variable]
     int flag = 0;
         ^~~~
/in/database.c:601:9: warning: unused variable 'tableNum' [-Wunused-variable]
     int tableNum = db->tableNum;
         ^~~~~~~~
/in/database.c:595:11: warning: variable 'cmd' set but not used [-Wunused-but-set-variable]
     char *cmd = malloc(10);
           ^~~
/in/database.c: In function 'Auto':
/in/database.c:633:9: warning: variable 'sel' set but not used [-Wunused-but-set-variable]
     int sel;
         ^~~
/in/database.c:627:17: warning: unused parameter 'str_in' [-Wunused-parameter]
 void Auto(char *str_in, Database *db)
                 ^~~~~~
/in/database.c: In function 'main':
/in/database.c:666:9: warning: variable 'sel' set but not used [-Wunused-but-set-variable]
     int sel;
         ^~~
/in/database.c:664:9: warning: unused variable 'smart' [-Wunused-variable]
     int smart = 0;
         ^~~~~
/in/database.c: In function 'Update':
/in/database.c:234:71: warning: 'val' may be used uninitialized in this function [-Wmaybe-uninitialized]
                                     ptable->assignments[i].difficulty = val;
                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
# Status Time Cost Memory Cost
#1 Runtime Error (-11) Detail 1ms 384.0 KiB
#2 Runtime Error (-11) Detail 1ms 364.0 KiB
#3 Runtime Error (-11) Detail 1ms 388.0 KiB
#4 Runtime Error (-11) Detail 1ms 376.0 KiB
#5 Runtime Error (-11) Detail 1ms 376.0 KiB

Information

Submit By
Type
Submission
Homework
Lab 5 (TEST ONLY) (+AUTO)
Language
C
Submit At
2021-11-15 17:44:30
Judged At
2021-11-21 15:06:43
Judged By
Score
0
Total Time
6ms
Peak Memory
388.0 KiB