Record Detail

Accepted

/in/database.c: In function 'UPDATEchar':
/in/database.c:258:25: warning: variable 'q' set but not used [-Wunused-but-set-variable]
     int i = 0, t, n, m, q;
                         ^
/in/database.c: In function 'DELETE':
/in/database.c:350:12: warning: variable 'arr' set but not used [-Wunused-but-set-variable]
     int n, arr[MAX_ASSIGNMENT] = {0}, i, t;
            ^~~
/in/database.c:348:50: warning: unused parameter 'tablename' [-Wunused-parameter]
 void DELETE(int tablenumber, Database *dp, char *tablename, char *course, char *name)
                                                  ^~~~~~~~~
/in/database.c: In function 'SELECT':
/in/database.c:413:30: warning: variable 'arr' set but not used [-Wunused-but-set-variable]
     int num1, num, smallest, arr[MAX_ASSIGNMENT], t, i, j, helper[MAX_ASSIGNMENT];
                              ^~~
/in/database.c:411:50: warning: unused parameter 'tablename' [-Wunused-parameter]
 void SELECT(int tablenumber, Database *dp, char *tablename, char *course, char *name, char *field, int limit)
                                                  ^~~~~~~~~
/in/database.c: In function 'main':
/in/database.c:670:11: warning: unused variable 'fp' [-Wunused-variable]
     FILE *fp, *fp1;
           ^~
/in/database.c:669:200: warning: unused variable 'num1' [-Wunused-variable]
     int i = 0, j = 0, smallest = 0, temp = 0, temp3, limit = 0, temp4, helper[MAX_ASSIGNMENT], q = -1, r, len, deadline, difficulty, value = 0, t, arr[MAX_ASSIGNMENT] = {0}, m, n, flag = 0, num = 0, num1 = 0;
                                                                                                                                                                                                        ^~~~
/in/database.c:669:191: warning: unused variable 'num' [-Wunused-variable]
     int i = 0, j = 0, smallest = 0, temp = 0, temp3, limit = 0, temp4, helper[MAX_ASSIGNMENT], q = -1, r, len, deadline, difficulty, value = 0, t, arr[MAX_ASSIGNMENT] = {0}, m, n, flag = 0, num = 0, num1 = 0;
                                                                                                                                                                                               ^~~
/in/database.c:669:181: warning: unused variable 'flag' [-Wunused-variable]
     int i = 0, j = 0, smallest = 0, temp = 0, temp3, limit = 0, temp4, helper[MAX_ASSIGNMENT], q = -1, r, len, deadline, difficulty, value = 0, t, arr[MAX_ASSIGNMENT] = {0}, m, n, flag = 0, num = 0, num1 = 0;
                                                                                                                                                                                     ^~~~
/in/database.c:669:178: warning: unused variable 'n' [-Wunused-variable]
     int i = 0, j = 0, smallest = 0, temp = 0, temp3, limit = 0, temp4, helper[MAX_ASSIGNMENT], q = -1, r, len, deadline, difficulty, value = 0, t, arr[MAX_ASSIGNMENT] = {0}, m, n, flag = 0, num = 0, num1 = 0;
                                                                                                                                                                                  ^
/in/database.c:669:175: warning: unused variable 'm' [-Wunused-variable]
     int i = 0, j = 0, smallest = 0, temp = 0, temp3, limit = 0, temp4, helper[MAX_ASSIGNMENT], q = -1, r, len, deadline, difficulty, value = 0, t, arr[MAX_ASSIGNMENT] = {0}, m, n, flag = 0, num = 0, num1 = 0;
                                                                                                                                                                               ^
/in/database.c:669:148: warning: unused variable 'arr' [-Wunused-variable]
     int i = 0, j = 0, smallest = 0, temp = 0, temp3, limit = 0, temp4, helper[MAX_ASSIGNMENT], q = -1, r, len, deadline, difficulty, value = 0, t, arr[MAX_ASSIGNMENT] = {0}, m, n, flag = 0, num = 0, num1 = 0;
                                                                                                                                                    ^~~
/in/database.c:669:145: warning: unused variable 't' [-Wunused-variable]
     int i = 0, j = 0, smallest = 0, temp = 0, temp3, limit = 0, temp4, helper[MAX_ASSIGNMENT], q = -1, r, len, deadline, difficulty, value = 0, t, arr[MAX_ASSIGNMENT] = {0}, m, n, flag = 0, num = 0, num1 = 0;
                                                                                                                                                 ^
/in/database.c:669:107: warning: unused variable 'len' [-Wunused-variable]
     int i = 0, j = 0, smallest = 0, temp = 0, temp3, limit = 0, temp4, helper[MAX_ASSIGNMENT], q = -1, r, len, deadline, difficulty, value = 0, t, arr[MAX_ASSIGNMENT] = {0}, m, n, flag = 0, num = 0, num1 = 0;
                                                                                                           ^~~
/in/database.c:669:96: warning: unused variable 'q' [-Wunused-variable]
     int i = 0, j = 0, smallest = 0, temp = 0, temp3, limit = 0, temp4, helper[MAX_ASSIGNMENT], q = -1, r, len, deadline, difficulty, value = 0, t, arr[MAX_ASSIGNMENT] = {0}, m, n, flag = 0, num = 0, num1 = 0;
                                                                                                ^
/in/database.c:669:72: warning: unused variable 'helper' [-Wunused-variable]
     int i = 0, j = 0, smallest = 0, temp = 0, temp3, limit = 0, temp4, helper[MAX_ASSIGNMENT], q = -1, r, len, deadline, difficulty, value = 0, t, arr[MAX_ASSIGNMENT] = {0}, m, n, flag = 0, num = 0, num1 = 0;
                                                                        ^~~~~~
/in/database.c:669:65: warning: unused variable 'temp4' [-Wunused-variable]
     int i = 0, j = 0, smallest = 0, temp = 0, temp3, limit = 0, temp4, helper[MAX_ASSIGNMENT], q = -1, r, len, deadline, difficulty, value = 0, t, arr[MAX_ASSIGNMENT] = {0}, m, n, flag = 0, num = 0, num1 = 0;
                                                                 ^~~~~
/in/database.c:669:47: warning: unused variable 'temp3' [-Wunused-variable]
     int i = 0, j = 0, smallest = 0, temp = 0, temp3, limit = 0, temp4, helper[MAX_ASSIGNMENT], q = -1, r, len, deadline, difficulty, value = 0, t, arr[MAX_ASSIGNMENT] = {0}, m, n, flag = 0, num = 0, num1 = 0;
                                               ^~~~~
/in/database.c:669:37: warning: unused variable 'temp' [-Wunused-variable]
     int i = 0, j = 0, smallest = 0, temp = 0, temp3, limit = 0, temp4, helper[MAX_ASSIGNMENT], q = -1, r, len, deadline, difficulty, value = 0, t, arr[MAX_ASSIGNMENT] = {0}, m, n, flag = 0, num = 0, num1 = 0;
                                     ^~~~
/in/database.c:669:23: warning: unused variable 'smallest' [-Wunused-variable]
     int i = 0, j = 0, smallest = 0, temp = 0, temp3, limit = 0, temp4, helper[MAX_ASSIGNMENT], q = -1, r, len, deadline, difficulty, value = 0, t, arr[MAX_ASSIGNMENT] = {0}, m, n, flag = 0, num = 0, num1 = 0;
                       ^~~~~~~~
/in/database.c:669:16: warning: unused variable 'j' [-Wunused-variable]
     int i = 0, j = 0, smallest = 0, temp = 0, temp3, limit = 0, temp4, helper[MAX_ASSIGNMENT], q = -1, r, len, deadline, difficulty, value = 0, t, arr[MAX_ASSIGNMENT] = {0}, m, n, flag = 0, num = 0, num1 = 0;
                ^
/in/database.c:669:9: warning: unused variable 'i' [-Wunused-variable]
     int i = 0, j = 0, smallest = 0, temp = 0, temp3, limit = 0, temp4, helper[MAX_ASSIGNMENT], q = -1, r, len, deadline, difficulty, value = 0, t, arr[MAX_ASSIGNMENT] = {0}, m, n, flag = 0, num = 0, num1 = 0;
         ^
/in/database.c:666:11: warning: unused variable 'tables' [-Wunused-variable]
     Table tables[MAX_TABLE] = {'\0'};
           ^~~~~~
/in/database.c:665:16: warning: unused variable 'assignments' [-Wunused-variable]
     Assignment assignments[MAX_ASSIGNMENT] = {'\0'};
                ^~~~~~~~~~~
/in/database.c:664:231: warning: unused variable 'query' [-Wunused-variable]
     char str[10] = {'\0'}, str1[10] = {'\0'}, filename[30] = {'\0'}, filename1[30] = {'\0'}, file1name[30] = {'\0'}, tablename[30] = {'\0'}, course[20] = {'\0'}, name[20] = {'\0'}, field[20], str2[30] = {'\0'}, str3[30] = {'\0'}, query[200] = {'\0'}, valuec[50];
                                                                                                                                                                                                                                       ^~~~~
/in/database.c: In function 'UPDATEchar':
/in/database.c:258:22: warning: 'm' may be used uninitialized in this function [-Wmaybe-uninitialized]
     int i = 0, t, n, m, q;
                      ^
/in/database.c: In function 'SELECT':
/in/database.c:565:37: warning: 'num1' may be used uninitialized in this function [-Wmaybe-uninitialized]
             if (num >= limit || num >= num1)
                                 ~~~~^~~~~~~
# Status Time Cost Memory Cost
#1 Accepted Detail 17ms 6.418 MiB
#2 Accepted Detail 30ms 6.41 MiB
#3 Accepted Detail 21ms 6.598 MiB
#4 Accepted Detail 29ms 6.441 MiB
#5 Accepted Detail 27ms 6.492 MiB
#6 Accepted Detail 30ms 6.543 MiB
#7 Accepted Detail 38ms 6.641 MiB
#8 Accepted Detail 27ms 6.742 MiB
#9 Accepted Detail 40ms 6.629 MiB
#10 Accepted Detail 41ms 6.715 MiB

Information

Submit By
Type
Submission
Homework
Lab 5 (TEST ONLY) (+AUTO)
Language
C
Submit At
2021-11-15 00:23:17
Judged At
2021-11-21 15:06:06
Judged By
Score
100
Total Time
305ms
Peak Memory
6.742 MiB