]> git.meshlink.io Git - meshlink/blobdiff - test/blackbox/run_blackbox_tests/test_cases_channel_set_receive_cb.c
Fix __warn_unused_result__, add more of it and fix the resulting warnings.
[meshlink] / test / blackbox / run_blackbox_tests / test_cases_channel_set_receive_cb.c
index 2986b3afb9f959ebdf5671e539a9e62f4866a6d9..697812e54224c1d0e9d0385ec6a43f4ce8dd7401 100644 (file)
     with this program; if not, write to the Free Software Foundation, Inc.,
     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
+
+#ifdef NDEBUG
+#undef NDEBUG
+#endif
+
 #include "execute_tests.h"
 #include "../common/containers.h"
 #include "../common/test_step.h"
@@ -117,7 +122,7 @@ static void test_case_set_channel_receive_cb_01(void **state) {
 */
 static bool test_steps_set_channel_receive_cb_01(void) {
        struct timespec timeout = {0};
-       meshlink_destroy("channelreceiveconf");
+       assert(meshlink_destroy("channelreceiveconf"));
        meshlink_set_log_cb(NULL, TEST_MESHLINK_LOG_LEVEL, meshlink_callback_logger);
 
        /* Create meshlink instance */
@@ -155,7 +160,7 @@ static bool test_steps_set_channel_receive_cb_01(void) {
        pthread_mutex_unlock(& lock_receive);
 
        meshlink_close(mesh_handle);
-       meshlink_destroy("channelreceiveconf");
+       assert(meshlink_destroy("channelreceiveconf"));
 
        return true;
 }
@@ -174,7 +179,7 @@ static void test_case_set_channel_receive_cb_02(void **state) {
     meshlink_channel_set_receive_cb returning proper meshlink_errno.
 */
 static bool test_steps_set_channel_receive_cb_02(void) {
-       meshlink_destroy("channelreceiveconf");
+       assert(meshlink_destroy("channelreceiveconf"));
        meshlink_set_log_cb(NULL, TEST_MESHLINK_LOG_LEVEL, meshlink_callback_logger);
 
        /* Create meshlink instance */
@@ -197,7 +202,7 @@ static bool test_steps_set_channel_receive_cb_02(void) {
        assert_int_equal(meshlink_errno, MESHLINK_EINVAL);
 
        meshlink_close(mesh_handle);
-       meshlink_destroy("channelreceiveconf");
+       assert(meshlink_destroy("channelreceiveconf"));
 
        return true;
 }
@@ -216,7 +221,7 @@ static void test_case_set_channel_receive_cb_03(void **state) {
     meshlink_channel_set_receive_cb returning proper meshlink_errno.
 */
 static bool test_steps_set_channel_receive_cb_03(void) {
-       meshlink_destroy("channelreceiveconf");
+       assert(meshlink_destroy("channelreceiveconf"));
        meshlink_set_log_cb(NULL, TEST_MESHLINK_LOG_LEVEL, meshlink_callback_logger);
 
        /* Create meshlink instance */
@@ -234,7 +239,7 @@ static bool test_steps_set_channel_receive_cb_03(void) {
 
        assert_int_equal(meshlink_errno, MESHLINK_EINVAL);
        meshlink_close(mesh_handle);
-       meshlink_destroy("channelreceiveconf");
+       assert(meshlink_destroy("channelreceiveconf"));
        return true;
 }