pschatzmann / arduino-audio-tools

Arduino Audio Tools (a powerful Audio library not only for Arduino)
GNU General Public License v3.0
1.27k stars 199 forks source link

Compiler warning: base class 'class audio_tools::AudioStream' should be explicitly initialized in the copy constructor [-Wextra] #1527

Closed tueddy closed 1 month ago

tueddy commented 1 month ago

Problem Description

Compiling with PlatformIO & some compiler flags enabled i get this warning:

.pio/libdeps/lolin_d32_pro_sdmmc_pe/audio-tools/src/AudioTools/AudioStreams.h: In copy constructor 'audio_tools::MemoryStream::MemoryStream(audio_tools::MemoryStream&)':
.pio/libdeps/lolin_d32_pro_sdmmc_pe/audio-tools/src/AudioTools/AudioStreams.h:243:3: warning: base class 'class audio_tools::AudioStream' should be explicitly initialized in the copy constructor [-Wextra]
   MemoryStream(MemoryStream& source) {

Device Description

ESP32

Sketch

Just include AudioTools.h

Other Steps to Reproduce

Just include AudioTools.h

What is your development environment

platform.ini:

platform = espressif32@^6.6.0
framework = arduino, espidf
build_flags =
    -std=c++17
    -std=gnu++17
    -Wall
    -Wextra
    -Wunreachable-code
build_unflags =
    -std=gnu++11
    -Werror=all

I have checked existing issues, discussions and online documentation

pschatzmann commented 1 month ago

Feel free to submit a pull request. I don't see any added value in adding some functionality that does nothing just for an extended compiler warning to go away.

By the way you seem to ignore the relevant documentation