/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.