Annotates the kTag with maybe_unused; they're only used for logging.
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
#include "sample.hpp"
|
||||
#include "tasks.hpp"
|
||||
|
||||
static constexpr char kTag[] = "mixer";
|
||||
[[maybe_unused]] static constexpr char kTag[] = "mixer";
|
||||
|
||||
static constexpr std::size_t kSampleBufferLength =
|
||||
drivers::kI2SBufferLengthFrames * sizeof(sample::Sample) * 2;
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
namespace audio {
|
||||
|
||||
static const char* kTag = "audio_dec";
|
||||
[[maybe_unused]] static const char* kTag = "audio_dec";
|
||||
|
||||
static constexpr std::size_t kCodecBufferLength =
|
||||
drivers::kI2SBufferLengthFrames * sizeof(sample::Sample) * 2;
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
namespace audio {
|
||||
|
||||
static const char kTag[] = "audio_fsm";
|
||||
[[maybe_unused]] static const char kTag[] = "audio_fsm";
|
||||
|
||||
std::shared_ptr<system_fsm::ServiceLocator> AudioState::sServices;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "result.hpp"
|
||||
#include "wm8523.hpp"
|
||||
|
||||
static const char* kTag = "BTOUT";
|
||||
[[maybe_unused]] static const char* kTag = "BTOUT";
|
||||
|
||||
namespace audio {
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "track.hpp"
|
||||
#include "types.hpp"
|
||||
|
||||
static const char* kTag = "SRC";
|
||||
[[maybe_unused]] static const char* kTag = "SRC";
|
||||
|
||||
namespace audio {
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
namespace audio {
|
||||
|
||||
static constexpr char kTag[] = "fatfs_src";
|
||||
[[maybe_unused]] static constexpr char kTag[] = "fatfs_src";
|
||||
|
||||
FatfsSource::FatfsSource(codecs::StreamType t, std::unique_ptr<FIL> file)
|
||||
: IStream(t), file_(std::move(file)) {}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "result.hpp"
|
||||
#include "wm8523.hpp"
|
||||
|
||||
static const char* kTag = "I2SOUT";
|
||||
[[maybe_unused]] static const char* kTag = "I2SOUT";
|
||||
|
||||
namespace audio {
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
namespace audio {
|
||||
|
||||
static constexpr char kTag[] = "tracks";
|
||||
[[maybe_unused]] static constexpr char kTag[] = "tracks";
|
||||
|
||||
TrackQueue::TrackQueue() {}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
namespace codecs {
|
||||
|
||||
static const char kTag[] = "flac";
|
||||
[[maybe_unused]] static const char kTag[] = "flac";
|
||||
|
||||
FoxenFlacDecoder::FoxenFlacDecoder()
|
||||
: input_(), buffer_(), flac_(FX_FLAC_ALLOC(FLAC_MAX_BLOCK_SIZE, 2)) {}
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@
|
||||
|
||||
namespace codecs {
|
||||
|
||||
static constexpr char kTag[] = "mad";
|
||||
[[maybe_unused]] static constexpr char kTag[] = "mad";
|
||||
|
||||
static constexpr uint32_t kMallocCapsPrefer =
|
||||
MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT;
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@
|
||||
|
||||
namespace codecs {
|
||||
|
||||
static constexpr char kTag[] = "opus";
|
||||
[[maybe_unused]] static constexpr char kTag[] = "opus";
|
||||
|
||||
static int read_cb(void* src, unsigned char* ptr, int nbytes) {
|
||||
IStream* source = reinterpret_cast<IStream*>(src);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
namespace codecs {
|
||||
|
||||
static constexpr char kTag[] = "dec_buf";
|
||||
[[maybe_unused]] static constexpr char kTag[] = "dec_buf";
|
||||
static constexpr size_t kBufferSize = 1024 * 8;
|
||||
|
||||
SourceBuffer::SourceBuffer()
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
namespace codecs {
|
||||
|
||||
static constexpr char kTag[] = "vorbis";
|
||||
[[maybe_unused]] static constexpr char kTag[] = "vorbis";
|
||||
|
||||
static size_t read_cb(void* ptr, size_t size, size_t nmemb, void* instance) {
|
||||
IStream* source = reinterpret_cast<IStream*>(instance);
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
namespace database {
|
||||
|
||||
static SingletonEnv<leveldb::EspEnv> sEnv;
|
||||
static const char* kTag = "DB";
|
||||
[[maybe_unused]] static const char* kTag = "DB";
|
||||
|
||||
static const char kDbPath[] = "/.tangara-db";
|
||||
|
||||
|
||||
@@ -44,11 +44,11 @@
|
||||
|
||||
namespace database {
|
||||
|
||||
static const char* kTag = "RECORDS";
|
||||
[[maybe_unused]] static const char* kTag = "RECORDS";
|
||||
|
||||
static const char kDataPrefix = 'D';
|
||||
static const char kHashPrefix = 'H';
|
||||
static const char kTagHashPrefix = 'T';
|
||||
[[maybe_unused]] static const char kTagHashPrefix = 'T';
|
||||
static const char kIndexPrefix = 'I';
|
||||
static const char kFieldSeparator = '\0';
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ static void toc(Tagctx* ctx, int ms, int offset) {}
|
||||
} // namespace libtags
|
||||
|
||||
static const std::size_t kBufSize = 1024;
|
||||
static const char* kTag = "TAGS";
|
||||
[[maybe_unused]] static const char* kTag = "TAGS";
|
||||
|
||||
TagParserImpl::TagParserImpl() {
|
||||
extension_to_parser_["opus"] = std::make_unique<OpusTagParser>();
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
namespace drivers {
|
||||
|
||||
static constexpr char kTag[] = "bluetooth";
|
||||
[[maybe_unused]] static constexpr char kTag[] = "bluetooth";
|
||||
|
||||
DRAM_ATTR static StreamBufferHandle_t sStream = nullptr;
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "spi.hpp"
|
||||
#include "tasks.hpp"
|
||||
|
||||
static const char* kTag = "DISPLAY";
|
||||
[[maybe_unused]] static const char* kTag = "DISPLAY";
|
||||
|
||||
// TODO(jacqueline): Encode width and height variations in the init data.
|
||||
static const uint8_t kDisplayHeight = 128 + 2;
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
namespace drivers {
|
||||
|
||||
static const char* kTag = "i2s_dac";
|
||||
[[maybe_unused]] static const char* kTag = "i2s_dac";
|
||||
static const i2s_port_t kI2SPort = I2S_NUM_0;
|
||||
|
||||
auto I2SDac::create(IGpios& expander) -> std::optional<I2SDac*> {
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@
|
||||
|
||||
namespace drivers {
|
||||
|
||||
static constexpr char kTag[] = "nvm";
|
||||
[[maybe_unused]] static constexpr char kTag[] = "nvm";
|
||||
static constexpr uint8_t kSchemaVersion = 1;
|
||||
|
||||
static constexpr char kKeyVersion[] = "ver";
|
||||
|
||||
@@ -22,7 +22,7 @@ enum Registers : uint8_t {
|
||||
};
|
||||
|
||||
static const uint8_t kAddress = 0x45;
|
||||
static const char kTag[] = "SAMD";
|
||||
[[maybe_unused]] static const char kTag[] = "SAMD";
|
||||
|
||||
namespace drivers {
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "gpios.hpp"
|
||||
#include "memory_resource.hpp"
|
||||
|
||||
static const char* kTag = "SDSTORAGE";
|
||||
[[maybe_unused]] static const char* kTag = "SDSTORAGE";
|
||||
static const uint8_t kMaxOpenFiles = 8;
|
||||
|
||||
namespace drivers {
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace drivers {
|
||||
|
||||
// Touch wheel implementation using a Microchip AT42QT2120
|
||||
|
||||
static const char* kTag = "TOUCHWHEEL";
|
||||
[[maybe_unused]] static const char* kTag = "TOUCHWHEEL";
|
||||
static const uint8_t kTouchWheelAddress = 0x1C;
|
||||
static const gpio_num_t kIntPin = GPIO_NUM_25;
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
namespace system_fsm {
|
||||
namespace states {
|
||||
|
||||
static const char kTag[] = "BOOT";
|
||||
[[maybe_unused]] static const char kTag[] = "BOOT";
|
||||
|
||||
static auto bt_event_cb(drivers::bluetooth::Event ev) -> void {
|
||||
if (ev == drivers::bluetooth::Event::kKnownDevicesChanged) {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
namespace system_fsm {
|
||||
namespace states {
|
||||
|
||||
static const char kTag[] = "IDLE";
|
||||
[[maybe_unused]] static const char kTag[] = "IDLE";
|
||||
static const TickType_t kTicksBeforeSleep = pdMS_TO_TICKS(10000);
|
||||
|
||||
static void timer_callback(TimerHandle_t timer) {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
namespace system_fsm {
|
||||
namespace states {
|
||||
|
||||
static const char kTag[] = "RUN";
|
||||
[[maybe_unused]] static const char kTag[] = "RUN";
|
||||
|
||||
static database::IFileGatherer* sFileGatherer;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "tag_parser.hpp"
|
||||
#include "track_queue.hpp"
|
||||
|
||||
static const char kTag[] = "system";
|
||||
[[maybe_unused]] static const char kTag[] = "system";
|
||||
|
||||
namespace system_fsm {
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "touchwheel.hpp"
|
||||
#include "ui_events.hpp"
|
||||
|
||||
static constexpr char kTag[] = "input";
|
||||
[[maybe_unused]] static constexpr char kTag[] = "input";
|
||||
|
||||
constexpr int kDPadAngleThreshold = 20;
|
||||
constexpr int kLongPressDelayMs = 500;
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
namespace ui {
|
||||
|
||||
static const char* kTag = "ui_task";
|
||||
[[maybe_unused]] static const char* kTag = "ui_task";
|
||||
|
||||
UiTask::UiTask() {}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "widget_top_bar.hpp"
|
||||
#include "widgets/lv_label.h"
|
||||
|
||||
static constexpr char kTag[] = "browser";
|
||||
[[maybe_unused]] static constexpr char kTag[] = "browser";
|
||||
|
||||
static constexpr int kMaxPages = 4;
|
||||
static constexpr int kPageBuffer = 6;
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@
|
||||
|
||||
namespace ui {
|
||||
|
||||
static constexpr char kTag[] = "ui_fsm";
|
||||
[[maybe_unused]] static constexpr char kTag[] = "ui_fsm";
|
||||
|
||||
static const std::size_t kRecordsPerPage = 15;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user