VCVRack / AudibleInstruments

VCV Rack plugin based on Mutable Instruments Eurorack modules
https://vcvrack.com/AudibleInstruments.html
Other
383 stars 84 forks source link

Fix maybe uninitialized warnings #115

Closed falkTX closed 2 years ago

falkTX commented 2 years ago

These were detected by GCC with LTO:

AudibleInstruments/src/Shelves.cpp: In member function 'process':
../src/Rack/include/engine/Port.hpp:43:21: error: 'frame.p2_lp_out' may be used uninitialized in this function [-Werror=maybe-uninitialized]
AudibleInstruments/src/Shelves.cpp:122:33: note: 'frame.p2_lp_out' was declared here
../src/Rack/include/engine/Port.hpp:43:21: error: 'frame.p2_bp_out' may be used uninitialized in this function [-Werror=maybe-uninitialized]
AudibleInstruments/src/Shelves.cpp:122:33: note: 'frame.p2_bp_out' was declared here
../src/Rack/include/engine/Port.hpp:43:21: error: 'frame.p2_hp_out' may be used uninitialized in this function [-Werror=maybe-uninitialized]
AudibleInstruments/src/Shelves.cpp:122:33: note: 'frame.p2_hp_out' was declared here

Not all of the variables are initialized in the constructor, so seems safer to force it with = {}.

AndrewBelt commented 2 years ago

Thanks!