Procházet zdrojové kódy

fix: Handle unused variable in radio scanner callback

Added UNUSED macro for 'size' parameter to suppress compiler warnings when FURI_DEBUG is not enabled. This ensures that the function remains clean and free from unused variable warnings in non-debug builds.
DerSkythe před 1 rokem
rodič
revize
d82ca69754
1 změnil soubory, kde provedl 2 přidání a 0 odebrání
  1. 2 0
      radio_scanner_app.c

+ 2 - 0
radio_scanner_app.c

@@ -65,6 +65,8 @@ static void radio_scanner_rx_callback(const void* data, size_t size, void* conte
     UNUSED(context);
 #ifdef FURI_DEBUG
     FURI_LOG_D(TAG, "radio_scanner_rx_callback called with size: %zu", size);
+#else
+    UNUSED(size);
 #endif
 }