rbcodec: Fix build failure with DEBUG but without LOGF

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]> Tue, 19 May 2026 19:48:55 -0400
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit bf8328fbe02233a7dd970cfce44d207ae134aa54
Author: Solomon Peachy <[email protected]>
Date:   Tue May 19 19:45:48 2026 -0400

    rbcodec:  Fix build failure with DEBUG but without LOGF
    
    Regression from 39497d1c747cca2
    
    Change-Id: I09ae974b56cd94753caa8bd4630d7ffcfe057846

diff --git a/apps/gui/usb_screen.c b/apps/gui/usb_screen.c
index 15d805b3dc..cbe3ef1664 100644
--- a/apps/gui/usb_screen.c
+++ b/apps/gui/usb_screen.c
@@ -249,6 +249,8 @@ void gui_usb_screen_run(bool early_usb, intptr_t seqnum)
 #ifdef USB_ENABLE_HID
     usb_keypad_mode = global_settings.usb_keypad_mode;
     title = &usb_screen_vps_ar[SCREEN_MAIN].title;
+#else
+    title = NULL;
 #endif
 
     FOR_NB_SCREENS(i)
diff --git a/lib/rbcodec/codecs/flac.c b/lib/rbcodec/codecs/flac.c
index 88964b64d6..cbcf42be3c 100644
--- a/lib/rbcodec/codecs/flac.c
+++ b/lib/rbcodec/codecs/flac.c
@@ -468,8 +468,8 @@ enum codec_status codec_run(void)
     size_t bytesleft;
     int consumed;
     int res;
-#ifdef LOGF_ENABLE
-    int frame;
+#if defined(LOGF_ENABLE) || defined(DEBUG)
+    int frame = 0;
 #endif
     intptr_t param;
 
@@ -505,9 +505,6 @@ enum codec_status codec_run(void)
     ci->set_elapsed(elapsedtime);
 
     /* The main decoding loop */
-#ifdef LOGF_ENABLE
-    frame=0;
-#endif
     buf = ci->request_buffer(&bytesleft, MAX_FRAMESIZE);
     while (bytesleft) {
         long action = ci->get_command(&param);
@@ -533,7 +530,7 @@ enum codec_status codec_run(void)
              return CODEC_ERROR;
         }
         consumed=fc.gb.index/8;
-#ifdef LOGF_ENABLE
+#if defined(LOGF_ENABLE) || defined(DEBUG)
         frame++;
 #endif
 
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs