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:97:29: warning: 'n_table' may be used uninitialized in this function [-Wmaybe-uninitialized]
     num = db.tables[n_table].assignNum-1;
           ~~~~~~~~~~~~~~~~~~^~~~~~~~~~
/in/database.c: In function 'PRINT':
/in/database.c:119:29: warning: 'n_table' may be used uninitialized in this function [-Wmaybe-uninitialized]
     num = db.tables[n_table].assignNum-1;
           ~~~~~~~~~~~~~~~~~~^~~~~~~~~~
/in/database.c: In function 'INSERT':
/in/database.c:151: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].course,course);
                                           ~~~~~~~~~~~~~~~~~~^~~~~~~~~~
/in/database.c: In function 'UPDATE':
/in/database.c:188:37: 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 'DELETE':
/in/database.c:244:37: 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 'SELECT':
/in/database.c:335:37: warning: 'n_table' may be used uninitialized in this function [-Wmaybe-uninitialized]
         for(i=0;i<db.tables[n_table].assignNum-1 && m<n_row;i++)
                   ~~~~~~~~~~~~~~~~~~^~~~~~~~~~
/in/database.c: In function 'AUTO':
/in/database.c:380:15: warning: 'p' may be used uninitialized in this function [-Wmaybe-uninitialized]
         str[p + 1] = '\0';
             ~~^~~
/in/database.c: In function 'main':
/in/database.c:419:15: warning: 'p' may be used uninitialized in this function [-Wmaybe-uninitialized]
         str[p + 1] = '\0';
             ~~^~~
# Status Time Cost Memory Cost
#1 Accepted Detail 25ms 6.508 MiB
#2 Accepted Detail 23ms 6.527 MiB
#3 Accepted Detail 26ms 6.5 MiB
#4 Accepted Detail 18ms 6.652 MiB
#5 Accepted Detail 30ms 6.516 MiB
#6 Accepted Detail 18ms 6.578 MiB
#7 Accepted Detail 29ms 6.508 MiB
#8 Accepted Detail 17ms 6.562 MiB
#9 Accepted Detail 18ms 6.566 MiB
#10 Accepted Detail 18ms 6.574 MiB

Information

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