Removes some GCC warnings

This commit is contained in:
Linus Probert 2018-04-20 14:46:00 +02:00
parent cab3b501fc
commit 04a3691463
2 changed files with 7 additions and 3 deletions

View File

@ -66,9 +66,13 @@ include_directories(
if (NOT WIN32) if (NOT WIN32)
include_directories( include_directories(
${X11_INCLUDE_DIR} ${X11_INCLUDE_DIR}
${CHECK_INCLUDE_DIR}
) )
endif (NOT WIN32) endif (NOT WIN32)
if (CHECK_FOUND)
include_directories(
${CHECK_INCLUDE_DIR}
)
endif(CHECK_FOUND)
if (NOT WIN32) if (NOT WIN32)
add_definitions(-std=gnu11 add_definitions(-std=gnu11

View File

@ -9,7 +9,7 @@ db_open(const char *file, sqlite3 **db)
int result = sqlite3_open(file, db); int result = sqlite3_open(file, db);
if (result) { if (result) {
error("Failed to open db: %s", sqlite3_errmsg(db)); error("Failed to open db: %s", sqlite3_errmsg(*db));
} }
return result == 0; return result == 0;
} }
@ -34,7 +34,7 @@ db_execute_stmnt(const char *stmnt,
void db_close(sqlite3 **db) void db_close(sqlite3 **db)
{ {
char *fname = sqlite3_db_filename(*db, NULL); const char *fname = sqlite3_db_filename(*db, NULL);
debug("Closing db: %s", fname); debug("Closing db: %s", fname);
sqlite3_close(*db); sqlite3_close(*db);
*db = NULL; *db = NULL;