check sqlite3_close() return value in test
authorChristian Grothoff <christian@grothoff.org>
Mon, 13 Mar 2017 17:09:28 +0000 (18:09 +0100)
committerChristian Grothoff <christian@grothoff.org>
Mon, 13 Mar 2017 17:09:28 +0000 (18:09 +0100)
src/datacache/plugin_datacache_sqlite.c
src/sq/test_sq.c

index 5cc48b26c90d80dbc082f06dbc0f191859b0dda0..dd79d01256e60efb84879e08027772b2665b6fed 100644 (file)
@@ -758,7 +758,8 @@ libgnunet_plugin_datacache_sqlite_init (void *cls)
     LOG_SQLITE (plugin->dbh,
                 GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
                 "sq_prepare");
-    (void) sqlite3_close (plugin->dbh);
+    GNUNET_break (SQLITE_OK ==
+                  sqlite3_close (plugin->dbh));
     GNUNET_free (plugin);
     return NULL;
   }
index 42c321666d3e0afc3f49e7c98a30a536c17fb751..6387eda31d4622d511a59f68a7d519b9e7ebd50f 100644 (file)
@@ -271,7 +271,8 @@ main(int argc,
             "Failed to drop table\n");
     ret = 1;
   }
-  sqlite3_close (dbh);
+  GNUNET_break (SQLITE_OK ==
+                sqlite3_close (dbh));
   if (0 != unlink ("test.db"))
     GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
                               "unlink",