Skip to content

Commit ebc3081

Browse files
committed
avoid warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
1 parent 3c01063 commit ebc3081

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/Audio.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
audio.cpp
44
55
Created on: Oct 28.2018 */char audioI2SVers[] ="\
6-
Version 3.4.2c ";
7-
/* Updated on: Aug 29.2025
6+
Version 3.4.2d ";
7+
/* Updated on: Sep 01.2025
88
99
Author: Wolle (schreibfaul1)
1010
Audio library for ESP32, ESP32-S3 or ESP32-P4

src/Audio.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ extern __attribute__((weak)) void audio_process_i2s(int16_t* outBuff, int32_t va
3939
extern char audioI2SVers[];
4040

4141
// Audio event type descriptions
42-
static constexpr char* eventStr[13] = {"info", "id3data", "eof", "station_name", "icy_description", "streamtitle", "bitrate", "icy_url", "icy_logo", "lasthost", "cover_image", "lyrics", "log"};
43-
42+
static constexpr std::array<const char*, 13> eventStr = {"info", "id3data", "eof", "station_name", "icy_description", "streamtitle", "bitrate", "icy_url", "icy_logo", "lasthost", "cover_image", "lyrics", "log"};
4443
//----------------------------------------------------------------------------------------------------------------------
4544

4645
class AudioBuffer {

0 commit comments

Comments
 (0)