]> git.meshlink.io Git - meshlink/blobdiff - test/blackbox/test_cases_submesh02/node_sim_corenode2.c
Ensure NDEBUG is not set in the test suite.
[meshlink] / test / blackbox / test_cases_submesh02 / node_sim_corenode2.c
index a7b4760b6087fb839b974c75658d099336ef0359..d99627253eb37535d22ee4536fddab5b2a765a95 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 <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -82,6 +87,8 @@ static bool channel_accept(meshlink_handle_t *mesh, meshlink_channel_t *channel,
 
 /* channel receive callback */
 static void channel_receive_cb(meshlink_handle_t *mesh, meshlink_channel_t *channel, const void *dat, size_t len) {
+       (void)mesh;
+
        char data[100] = {0};
 
        if(len == 0) {
@@ -115,8 +122,9 @@ 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 *node,
-                           bool reachable) {
+static void node_status_cb(meshlink_handle_t *mesh, meshlink_node_t *node, bool reachable) {
+       (void)mesh;
+
        if(!strcasecmp(node->name, "corenode1")) {
                if(reachable) {
                        fprintf(stderr, "Node corenode2 became reachable");
@@ -127,12 +135,16 @@ static void node_status_cb(meshlink_handle_t *mesh, meshlink_node_t *node,
        return;
 }
 
-void mesh_start_test_handler(int a) {
+void mesh_start_test_handler(int signum) {
+       (void)signum;
+
        fprintf(stderr, "Starting test in corenode2\n");
        set_sync_flag(&start_test, true);
 }
 
 int main(int argc, char *argv[]) {
+       (void)argc;
+
        struct timeval main_loop_wait = { 2, 0 };
        meshlink_channel_t *channel = NULL;
        meshlink_node_t *core_node = NULL;
@@ -197,4 +209,4 @@ int main(int argc, char *argv[]) {
        meshlink_close(mesh);
 
        return EXIT_SUCCESS;
-}
\ No newline at end of file
+}