Smattr / clink

a modern re-implementation of Cscope
The Unlicense
43 stars 2 forks source link

build warnings with GCC 8.3.0 #122

Closed Smattr closed 1 year ago

Smattr commented 1 year ago

When building in release mode, LTO has some things to say:

tmp/tmp.HMfOHnPYhz/clink/libclink/src/re_sqlite.c: In function ‘re_sqlite’:
/tmp/tmp.HMfOHnPYhz/clink/libclink/src/re_sqlite.c:8:46: warning: unused parameter ‘argc’ [-Wunused-parameter]
 void re_sqlite(sqlite3_context *context, int argc, sqlite3_value **argv) {                                                                                                                                                                                            
                                          ~~~~^~~~

/tmp/tmp.HMfOHnPYhz/clink/libclink/src/db_open.c: In function ‘clink_db_open.constprop’:
/tmp/tmp.HMfOHnPYhz/clink/libclink/src/db_open.c:119:8: warning: ‘exists’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     if (!exists)
        ^
/tmp/tmp.HMfOHnPYhz/clink/libclink/src/db_open.c:82:8: note: ‘exists’ was declared here
   bool exists = !(access(path, R_OK | W_OK) == -1 && errno == ENOENT);
        ^