/in/database.c: In function 'is_in':
/in/database.c:9:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while (i < strlen(s) && j < strlen(c)) {
^
/in/database.c:9:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while (i < strlen(s) && j < strlen(c)) {
^
/in/database.c:17:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (j == strlen(c)) { //如果匹配成功
^~
/in/database.c: In function 'List':
/in/database.c:51:52: warning: passing argument 4 of 'qsort' from incompatible pointer type [-Wincompatible-pointer-types]
qsort(db->tables, db->tableNum, sizeof(Table), compare_tables);
^~~~~~~~~~~~~~
In file included from /in/database.c:3:0:
/usr/include/stdlib.h:827:13: note: expected '__compar_fn_t {aka int (*)(const void *, const void *)}' but argument is of type 'int (*)(Table *, Table *) {aka int (*)(struct <anonymous> *, struct <anonymous> *)}'
extern void qsort (void *__base, size_t __nmemb, size_t __size,
^~~~~
/in/database.c: In function 'Load':
/in/database.c:73:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int ii = 0; ii < strlen(buf); ii++) {
^
/in/database.c: In function 'EXE':
/in/database.c:469:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < strlen(command); i++) {
^
/in/database.c:485:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < strlen(command); i++) {
^
/in/database.c:500:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < strlen(command); i++) {
^
/in/database.c:513:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int ii = 0; ii < strlen(command); ii++) {
^
/in/database.c:542:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int ii = 0; ii < strlen(command); ii++) {
^
/in/database.c:537:24: warning: unused variable 'num' [-Wunused-variable]
int judge = 0, num;
^~~
/in/database.c:565:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int ii = 0; ii < strlen(command); ii++) {
^
/in/database.c:581:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int ii = 0; ii < strlen(command); ii++) {
^
/in/database.c:601:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < strlen(command); i++) {
^
/in/database.c: In function 'main':
/in/database.c:631:9: warning: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
gets(command);
^~~~
fgets
/in/database.c: In function 'Select':
/in/database.c:317:27: warning: iteration 100 invokes undefined behavior [-Waggressive-loop-optimizations]
ddlseq[x] = 1000000000;
~~~~~~~~~~^~~~~~~~~~~~
/in/database.c:316:13: note: within this loop
for (int x = 0; x < 101; x++) {
^~~
/in/database.c: In function 'EXE':
/in/database.c:468:13: warning: 'position' may be used uninitialized in this function [-Wmaybe-uninitialized]
int position;
^~~~~~~~
/in/database.c:499:13: warning: 'position' may be used uninitialized in this function [-Wmaybe-uninitialized]
int position;
^~~~~~~~
/in/database.c:600:13: warning: 'position1' may be used uninitialized in this function [-Wmaybe-uninitialized]
int position1;
^~~~~~~~~
/tmp/ccc0Dntd.o: In function `main':
database.c:(.text.startup+0x59): warning: the `gets' function is dangerous and should not be used.