]> git.meshlink.io Git - meshlink/blobdiff - test/duplicate.c
Fix __warn_unused_result__, add more of it and fix the resulting warnings.
[meshlink] / test / duplicate.c
index 28155711ca2f984fd1dcbd98831c450ee222fb02..db2ce72a0db80540d0c8ac5aadf26b41db581465 100644 (file)
@@ -15,7 +15,7 @@ static struct sync_flag duplicate_detected;
 
 static void handle_duplicate(meshlink_handle_t *mesh, meshlink_node_t *node) {
        set_sync_flag(&duplicate_detected, true);
-       meshlink_blacklist(mesh, node);
+       assert(meshlink_blacklist(mesh, node));
 }
 
 int main() {
@@ -34,7 +34,7 @@ int main() {
                mesh[i] = meshlink_open(dirname, name[i], "duplicate", DEV_CLASS_BACKBONE);
                assert(mesh[i]);
 
-               meshlink_add_address(mesh[i], "localhost");
+               assert(meshlink_add_address(mesh[i], "localhost"));
                meshlink_enable_discovery(mesh[i], false);
 
                meshlink_set_node_duplicate_cb(mesh[i], handle_duplicate);