View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003791 | GNUnet | datastore service | public | 2015-05-19 13:15 | 2018-06-07 00:25 |
Reporter | Bart Polot | Assigned To | Christian Grothoff | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Product Version | Git master | ||||
Target Version | 0.11.0pre66 | Fixed in Version | 0.11.0pre66 | ||
Summary | 0003791: Warning in datastore sqlite compilation | ||||
Description | CC libgnunet_plugin_datastore_postgres_la-plugin_datastore_postgres.lo plugin_datastore_sqlite.c: In function ‘sqlite_plugin_put’: plugin_datastore_sqlite.c:57:183: warning: the comparison will always evaluate as ‘true’ for the address of ‘msg’ will never be NULL [-Waddress] #define LOG_SQLITE(db, msg, level, cmd) do { GNUNET_log_from (level, "sqlite", _("`%s' failed at %s:%d with error: %s\n"), cmd, __FILE__, __LINE__, sqlite3_errmsg(db->dbh)); if (msg != NULL) GNUNET_asprintf(msg, _("`%s' failed at %s:%u with error: %s"), cmd, __FILE__, __LINE__, sqlite3_errmsg(db->dbh)); } while(0) ^ plugin_datastore_sqlite.c:527:5: note: in expansion of macro ‘LOG_SQLITE’ LOG_SQLITE (plugin, &msg, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, ^ plugin_datastore_sqlite.c:57:183: warning: the comparison will always evaluate as ‘true’ for the address of ‘msg’ will never be NULL [-Waddress] #define LOG_SQLITE(db, msg, level, cmd) do { GNUNET_log_from (level, "sqlite", _("`%s' failed at %s:%d with error: %s\n"), cmd, __FILE__, __LINE__, sqlite3_errmsg(db->dbh)); if (msg != NULL) GNUNET_asprintf(msg, _("`%s' failed at %s:%u with error: %s"), cmd, __FILE__, __LINE__, sqlite3_errmsg(db->dbh)); } while(0) ^ plugin_datastore_sqlite.c:549:5: note: in expansion of macro ‘LOG_SQLITE’ LOG_SQLITE (plugin, &msg, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, ^ plugin_datastore_sqlite.c:57:183: warning: the comparison will always evaluate as ‘true’ for the address of ‘msg’ will never be NULL [-Waddress] #define LOG_SQLITE(db, msg, level, cmd) do { GNUNET_log_from (level, "sqlite", _("`%s' failed at %s:%d with error: %s\n"), cmd, __FILE__, __LINE__, sqlite3_errmsg(db->dbh)); if (msg != NULL) GNUNET_asprintf(msg, _("`%s' failed at %s:%u with error: %s"), cmd, __FILE__, __LINE__, sqlite3_errmsg(db->dbh)); } while(0) ^ plugin_datastore_sqlite.c:554:5: note: in expansion of macro ‘LOG_SQLITE’ LOG_SQLITE (plugin, &msg, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, ^ plugin_datastore_sqlite.c: In function ‘sqlite_plugin_update’: plugin_datastore_sqlite.c:57:183: warning: the comparison will always evaluate as ‘true’ for the address of ‘msg’ will never be NULL [-Waddress] #define LOG_SQLITE(db, msg, level, cmd) do { GNUNET_log_from (level, "sqlite", _("`%s' failed at %s:%d with error: %s\n"), cmd, __FILE__, __LINE__, sqlite3_errmsg(db->dbh)); if (msg != NULL) GNUNET_asprintf(msg, _("`%s' failed at %s:%u with error: %s"), cmd, __FILE__, __LINE__, sqlite3_errmsg(db->dbh)); } while(0) ^ plugin_datastore_sqlite.c:613:5: note: in expansion of macro ‘LOG_SQLITE’ LOG_SQLITE (plugin, &msg, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, ^ plugin_datastore_sqlite.c:57:183: warning: the comparison will always evaluate as ‘true’ for the address of ‘msg’ will never be NULL [-Waddress] #define LOG_SQLITE(db, msg, level, cmd) do { GNUNET_log_from (level, "sqlite", _("`%s' failed at %s:%d with error: %s\n"), cmd, __FILE__, __LINE__, sqlite3_errmsg(db->dbh)); if (msg != NULL) GNUNET_asprintf(msg, _("`%s' failed at %s:%u with error: %s"), cmd, __FILE__, __LINE__, sqlite3_errmsg(db->dbh)); } while(0) ^ plugin_datastore_sqlite.c:634:5: note: in expansion of macro ‘LOG_SQLITE’ LOG_SQLITE (plugin, &msg, ^ plugin_datastore_sqlite.c:57:183: warning: the comparison will always evaluate as ‘true’ for the address of ‘msg’ will never be NULL [-Waddress] #define LOG_SQLITE(db, msg, level, cmd) do { GNUNET_log_from (level, "sqlite", _("`%s' failed at %s:%d with error: %s\n"), cmd, __FILE__, __LINE__, sqlite3_errmsg(db->dbh)); if (msg != NULL) GNUNET_asprintf(msg, _("`%s' failed at %s:%u with error: %s"), cmd, __FILE__, __LINE__, sqlite3_errmsg(db->dbh)); } while(0) ^ plugin_datastore_sqlite.c:641:5: note: in expansion of macro ‘LOG_SQLITE’ LOG_SQLITE (plugin, &msg, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, ^ | ||||
Tags | No tags attached. | ||||
|
Yes, stupid GCC not understanding that during macro-expansion an conditional 'if' may become unconditionally true... Not sure how to fix. |
|
Fixed in SVN 35759 by going to 2 macros. |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-05-19 13:15 | Bart Polot | New Issue | |
2015-05-20 08:56 | Christian Grothoff | Note Added: 0009131 | |
2015-05-20 17:25 | Christian Grothoff | Note Added: 0009138 | |
2015-05-20 17:25 | Christian Grothoff | Status | new => resolved |
2015-05-20 17:25 | Christian Grothoff | Fixed in Version | => 0.11.0pre66 |
2015-05-20 17:25 | Christian Grothoff | Resolution | open => fixed |
2015-05-20 17:25 | Christian Grothoff | Assigned To | => Christian Grothoff |
2018-06-07 00:25 | Christian Grothoff | Status | resolved => closed |