]> git.meshlink.io Git - meshlink/blobdiff - test/blackbox/run_blackbox_tests/test_cases_channel_set_poll_cb.c
Fix compiler warnings in the test suites.
[meshlink] / test / blackbox / run_blackbox_tests / test_cases_channel_set_poll_cb.c
index 2234c393bb078b3c61dfbfbdcb12aa7546b26909..33ce247309370d138278d34344a1167a2e2f4970 100644 (file)
@@ -80,6 +80,13 @@ static void poll_cb(meshlink_handle_t *mesh, meshlink_channel_t *channel, size_t
 }
 
 static void node_status_cb(meshlink_handle_t *mesh, meshlink_node_t *source, bool reach) {
+       (void)mesh;
+       (void)source;
+
+       if(!reach) {
+               return;
+       }
+
        pthread_mutex_lock(&reachable_lock);
        reachable = true;
        assert(!pthread_cond_broadcast(&reachable_cond));
@@ -197,7 +204,7 @@ static bool test_steps_channel_set_poll_cb_02(void) {
 
        /* Setting poll cb with NULL as mesh handler */
        meshlink_set_channel_poll_cb(NULL, channel, poll_cb);
-       assert_int_equal(meshlink_errno, MESHLINK_EINVAL);
+       assert_int_not_equal(meshlink_errno, 0);
 
        meshlink_close(mesh_handle);
        meshlink_destroy("channelpollconf3");