View Issue Details

IDProjectCategoryView StatusLast Update
0003791GNUnetdatastore servicepublic2018-06-07 00:25
ReporterBart Polot Assigned ToChristian Grothoff  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product VersionGit master 
Target Version0.11.0pre66Fixed in Version0.11.0pre66 
Summary0003791: 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,
     ^
TagsNo tags attached.

Activities

Christian Grothoff

2015-05-20 08:56

manager   ~0009131

Yes, stupid GCC not understanding that during macro-expansion an conditional 'if' may become unconditionally true... Not sure how to fix.

Christian Grothoff

2015-05-20 17:25

manager   ~0009138

Fixed in SVN 35759 by going to 2 macros.

Issue History

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