Record Detail

Accepted

/in/database.c: In function 'INSERT':
/in/database.c:136:11: warning: variable 'no' set but not used [-Wunused-but-set-variable]
     char *no,*course,*name,*tablename={"\0"};;
           ^~
/in/database.c: In function 'UPDATE':
/in/database.c:161:11: warning: variable 'no' set but not used [-Wunused-but-set-variable]
     char *no,*field,*value,*tablename,*course,*name;
           ^~
/in/database.c: In function 'DELETE':
/in/database.c:221:22: warning: variable 'no' set but not used [-Wunused-but-set-variable]
     char *tablename,*no,*course,*name;
                      ^~
/in/database.c: In function 'SELECT':
/in/database.c:304:11: warning: variable 'no' set but not used [-Wunused-but-set-variable]
     char *no,*sortway,*tablename,*course,*name;
           ^~
/in/database.c: In function 'SAVE':
/in/database.c:101:34: warning: 'n_table' may be used uninitialized in this function [-Wmaybe-uninitialized]
     for (i=0;i<db.tables[n_table].assignNum-1;i++)
                ~~~~~~~~~~~~~~~~~~^~~~~~~~~~
/in/database.c: In function 'PRINT':
/in/database.c:108:17: warning: 'n_table' may be used uninitialized in this function [-Wmaybe-uninitialized]
     int n,j,num,n_table;
                 ^~~~~~~
/in/database.c: In function 'INSERT':
/in/database.c:152:61: warning: 'n_table' may be used uninitialized in this function [-Wmaybe-uninitialized]
     strcpy(db.tables[n_table].assignments[db.tables[n_table].assignNum-1].name,name);
                                           ~~~~~~~~~~~~~~~~~~^~~~~~~~~~
/in/database.c: In function 'UPDATE':
/in/database.c:162:23: warning: 'n_table' may be used uninitialized in this function [-Wmaybe-uninitialized]
     int i,j=0,max=0,n,n_table;
                       ^~~~~~~
/in/database.c: In function 'DELETE':
/in/database.c:222:25: warning: 'n_table' may be used uninitialized in this function [-Wmaybe-uninitialized]
     int i,j,max=0,num,n,n_table;
                         ^~~~~~~
/in/database.c: In function 'SELECT':
/in/database.c:305:23: warning: 'n_table' may be used uninitialized in this function [-Wmaybe-uninitialized]
     int n_row,i,m=0,n,n_table;
                       ^~~~~~~
/in/database.c: In function 'AUTO':
/in/database.c:370:11: warning: 'p' may be used uninitialized in this function [-Wmaybe-uninitialized]
     int n,p;
           ^
/in/database.c: In function 'main':
/in/database.c:411:11: warning: 'p' may be used uninitialized in this function [-Wmaybe-uninitialized]
     int n,p;
           ^
# Status Time Cost Memory Cost
#1 Accepted Detail 1ms 252.0 KiB
#2 Accepted Detail 1ms 296.0 KiB
#3 Accepted Detail 1ms 260.0 KiB
#4 Accepted Detail 1ms 316.0 KiB
#5 Accepted Detail 1ms 340.0 KiB

Information

Submit By
Type
Submission
Homework
Lab 5 (TEST ONLY) (+AUTO)
Language
C
Submit At
2021-11-18 07:25:02
Judged At
2021-11-21 15:06:04
Judged By
Score
100
Total Time
6ms
Peak Memory
340.0 KiB