diff --git a/examples/nimble_gatt/main.c b/examples/nimble_gatt/main.c
index dea9ff4d6da584521a8c09284c856a3861dee70c..4d37a7d6a7bc3fc700dd3d78887c7959c4353640 100644
--- a/examples/nimble_gatt/main.c
+++ b/examples/nimble_gatt/main.c
@@ -90,6 +90,7 @@ static void start_advertise(void)
     rc = ble_gap_adv_start(own_addr_type, NULL, BLE_HS_FOREVER,
                            &advp, gap_event_cb, NULL);
     assert(rc == 0);
+    (void)rc;
 }
 
 static void app_ble_sync_cb(void)
@@ -101,6 +102,7 @@ static void app_ble_sync_cb(void)
 
     rc = ble_hs_id_infer_auto(0, &own_addr_type);
     assert(rc == 0);
+    (void)rc;
 
     /* generate the advertising data */
     update_ad();