]> git.meshlink.io Git - meshlink/blobdiff - test/trio2.c
Fix __warn_unused_result__, add more of it and fix the resulting warnings.
[meshlink] / test / trio2.c
index c21cba223a5b546bbc6838963bcb02cfc2d39304..57312988e1b174885eeff1a08c8f53483bb06dd0 100644 (file)
@@ -1,5 +1,9 @@
 #define _GNU_SOURCE
 
+#ifdef NDEBUG
+#undef NDEBUG
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -61,7 +65,7 @@ int main() {
                assert(mesh[i]);
                free(path);
 
-               meshlink_add_address(mesh[i], "localhost");
+               assert(meshlink_add_address(mesh[i], "localhost"));
 
                data[i] = meshlink_export(mesh[i]);
                assert(data[i]);