]> git.meshlink.io Git - meshlink/blobdiff - test/blackbox/run_blackbox_tests/test_cases_random_port_bindings01.c
Fix __warn_unused_result__, add more of it and fix the resulting warnings.
[meshlink] / test / blackbox / run_blackbox_tests / test_cases_random_port_bindings01.c
index d39d2dc6c66a412c866ee38b9cd4ced79ffc283c..5cce98c0b4e805b296b8b70132b331efe64d9081 100644 (file)
     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
 
+#ifdef NDEBUG
+#undef NDEBUG
+#endif
+
 /* Modify this to change the logging level of Meshlink */
 #define TEST_MESHLINK_LOG_LEVEL MESHLINK_DEBUG
 
@@ -139,7 +143,7 @@ void test_case_mesh_random_port_bindings_01(void **state) {
 */
 bool test_steps_mesh_random_port_bindings_01(void) {
        meshlink_handle_t *relay = NULL;
-       meshlink_destroy("relay_conf");
+       assert(meshlink_destroy("relay_conf"));
 
        meshlink_set_log_cb(NULL, MESHLINK_DEBUG, log_message);
 
@@ -167,7 +171,7 @@ bool test_steps_mesh_random_port_bindings_01(void) {
        ipv6_fd = -1;
 
        meshlink_close(relay);
-       meshlink_destroy("relay_conf");
+       assert(meshlink_destroy("relay_conf"));
 
        return true;
 }
@@ -189,7 +193,7 @@ void test_case_mesh_random_port_bindings_02(void **state) {
 */
 bool test_steps_mesh_random_port_bindings_02(void) {
        meshlink_handle_t *relay = NULL;
-       meshlink_destroy("relay_conf");
+       assert(meshlink_destroy("relay_conf"));
 
        meshlink_set_log_cb(NULL, MESHLINK_DEBUG, log_message);
 
@@ -216,7 +220,7 @@ bool test_steps_mesh_random_port_bindings_02(void) {
        ipv6_fd = -1;
 
        meshlink_close(relay);
-       meshlink_destroy("relay_conf");
+       assert(meshlink_destroy("relay_conf"));
        return true;
 }
 
@@ -240,7 +244,7 @@ void test_case_mesh_random_port_bindings_03(void **state) {
 bool test_steps_mesh_random_port_bindings_03(void) {
        int port, new_port;
        meshlink_handle_t *relay = NULL;
-       meshlink_destroy("relay_conf");
+       assert(meshlink_destroy("relay_conf"));
 
        meshlink_set_log_cb(NULL, MESHLINK_DEBUG, log_message);
 
@@ -278,7 +282,7 @@ bool test_steps_mesh_random_port_bindings_03(void) {
        ipv6_fd = -1;
 
        meshlink_close(relay);
-       meshlink_destroy("relay_conf");
+       assert(meshlink_destroy("relay_conf"));
        return true;
 }