From 44d45a6342cd3702139bcfae9859a4220a32280c Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Fri, 26 Jan 2024 01:10:37 +1100 Subject: [PATCH] util/cdrom.h: Fixed size of track info array. Also made it possible to enable VERBOSE in cdrom.cpp without link errors. --- src/lib/util/cdrom.cpp | 27 +-------------------------- src/lib/util/cdrom.h | 2 +- 2 files changed, 2 insertions(+), 27 deletions(-) diff --git a/src/lib/util/cdrom.cpp b/src/lib/util/cdrom.cpp index 36a51104d3c..0f7b618bdf5 100644 --- a/src/lib/util/cdrom.cpp +++ b/src/lib/util/cdrom.cpp @@ -34,7 +34,6 @@ /** @brief The verbose. */ #define VERBOSE (0) #define EXTRA_VERBOSE (0) -#if VERBOSE /** * @def LOG(x) do @@ -44,31 +43,7 @@ * @param x The void to process. */ -#define LOG(x) do { if (VERBOSE) logerror x; } while (0) - -/** - * @fn void CLIB_DECL logerror(const char *text, ...) ATTR_PRINTF(1,2); - * - * @brief Logerrors the given text. - * - * @param text The text. - * - * @return A CLIB_DECL. - */ - -void CLIB_DECL logerror(const char *text, ...) ATTR_PRINTF(1,2); -#else - -/** - * @def LOG(x); - * - * @brief A macro that defines log. - * - * @param x The void to process. - */ - -#define LOG(x) -#endif +#define LOG(x) do { if (VERBOSE) { osd_printf_info x; } } while (0) diff --git a/src/lib/util/cdrom.h b/src/lib/util/cdrom.h index 214a7ed39d6..20769a874b7 100644 --- a/src/lib/util/cdrom.h +++ b/src/lib/util/cdrom.h @@ -92,7 +92,7 @@ public: { uint32_t numtrks; /* number of tracks */ uint32_t flags; /* see FLAG_ above */ - track_info tracks[MAX_TRACKS]; + track_info tracks[MAX_TRACKS + 1]; }; struct track_input_entry