Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings observed while building Cardinal #997

Open
cosinekitty opened this issue Apr 1, 2024 · 1 comment
Open

Warnings observed while building Cardinal #997

cosinekitty opened this issue Apr 1, 2024 · 1 comment

Comments

@cosinekitty
Copy link

I'm reporting these warnings in the spirit of helpfulness as a fellow developer, not because they are causing me any problems. So no worries if nobody cares, LOL.

Building Cardinal this morning to prepare my next Sapphire update PR there, I noticed the following warnings in the Surge XT build. Many of them are for uninitialized memory or other potentially scary undefined behavior.

Compiling surgext/src/Delay.cpp
Compiling surgext/src/DelayLineByFreq.cpp
Compiling surgext/src/DelayLineByFreqExpanded.cpp
Compiling surgext/src/DigitalRingMod.cpp
Compiling surgext/src/EGxVCA.cpp
In file included from surgext/src/EGxVCA.cpp:19:
In member function ‘void sst::surgext_rack::egxvca::EGxVCA::linterp::setTarget(float)’,
    inlined from ‘void sst::surgext_rack::egxvca::EGxVCA::processFastSlow(const rack::engine::Module::ProcessArgs&, const std::array<std::unique_ptr<_Tp>, 16>&) [with ENVT = sst::basic_blocks::modulators::DAHDEnvelope<SurgeStorage, 8>]’ at surgext/src/EGxVCA.h:526:45:
surgext/src/EGxVCA.h:430:55: warning: ‘pm[3]’ may be used uninitialized [-Wmaybe-uninitialized]
  430 |         inline void setTarget(float f) { dtarget = (f - target) * BLOCK_SIZE_INV; }
      |                                                    ~~~^~~~~~~~~
surgext/src/EGxVCA.h: In function ‘void sst::surgext_rack::egxvca::EGxVCA::processFastSlow(const rack::engine::Module::ProcessArgs&, const std::array<std::unique_ptr<_Tp>, 16>&) [with ENVT = sst::basic_blocks::modulators::DAHDEnvelope<SurgeStorage, 8>]’:
surgext/src/EGxVCA.h:512:62: note: ‘pm[3]’ was declared here
  512 |                     basic_blocks::dsp::pan_laws::panmatrix_t pm;
      |                                                              ^~
In member function ‘void sst::surgext_rack::egxvca::EGxVCA::linterp::setTarget(float)’,
    inlined from ‘void sst::surgext_rack::egxvca::EGxVCA::processFastSlow(const rack::engine::Module::ProcessArgs&, const std::array<std::unique_ptr<_Tp>, 16>&) [with ENVT = sst::basic_blocks::modulators::DAHDEnvelope<SurgeStorage, 8>]’ at surgext/src/EGxVCA.h:526:45:
surgext/src/EGxVCA.h:430:55: warning: ‘pm[2]’ may be used uninitialized [-Wmaybe-uninitialized]
  430 |         inline void setTarget(float f) { dtarget = (f - target) * BLOCK_SIZE_INV; }
      |                                                    ~~~^~~~~~~~~
surgext/src/EGxVCA.h: In function ‘void sst::surgext_rack::egxvca::EGxVCA::processFastSlow(const rack::engine::Module::ProcessArgs&, const std::array<std::unique_ptr<_Tp>, 16>&) [with ENVT = sst::basic_blocks::modulators::DAHDEnvelope<SurgeStorage, 8>]’:
surgext/src/EGxVCA.h:512:62: note: ‘pm[2]’ was declared here
  512 |                     basic_blocks::dsp::pan_laws::panmatrix_t pm;
      |                                                              ^~
In member function ‘void sst::surgext_rack::egxvca::EGxVCA::linterp::setTarget(float)’,
    inlined from ‘void sst::surgext_rack::egxvca::EGxVCA::processFastSlow(const rack::engine::Module::ProcessArgs&, const std::array<std::unique_ptr<_Tp>, 16>&) [with ENVT = sst::basic_blocks::modulators::DAHDEnvelope<SurgeStorage, 8>]’ at surgext/src/EGxVCA.h:526:45:
surgext/src/EGxVCA.h:430:55: warning: ‘pm[1]’ may be used uninitialized [-Wmaybe-uninitialized]
  430 |         inline void setTarget(float f) { dtarget = (f - target) * BLOCK_SIZE_INV; }
      |                                                    ~~~^~~~~~~~~
surgext/src/EGxVCA.h: In function ‘void sst::surgext_rack::egxvca::EGxVCA::processFastSlow(const rack::engine::Module::ProcessArgs&, const std::array<std::unique_ptr<_Tp>, 16>&) [with ENVT = sst::basic_blocks::modulators::DAHDEnvelope<SurgeStorage, 8>]’:
surgext/src/EGxVCA.h:512:62: note: ‘pm[1]’ was declared here
  512 |                     basic_blocks::dsp::pan_laws::panmatrix_t pm;
      |                                                              ^~
In member function ‘void sst::surgext_rack::egxvca::EGxVCA::linterp::setTarget(float)’,
    inlined from ‘void sst::surgext_rack::egxvca::EGxVCA::processFastSlow(const rack::engine::Module::ProcessArgs&, const std::array<std::unique_ptr<_Tp>, 16>&) [with ENVT = sst::basic_blocks::modulators::DAHDEnvelope<SurgeStorage, 8>]’ at surgext/src/EGxVCA.h:526:45:
surgext/src/EGxVCA.h:430:55: warning: ‘pm[0]’ may be used uninitialized [-Wmaybe-uninitialized]
  430 |         inline void setTarget(float f) { dtarget = (f - target) * BLOCK_SIZE_INV; }
      |                                                    ~~~^~~~~~~~~
surgext/src/EGxVCA.h: In function ‘void sst::surgext_rack::egxvca::EGxVCA::processFastSlow(const rack::engine::Module::ProcessArgs&, const std::array<std::unique_ptr<_Tp>, 16>&) [with ENVT = sst::basic_blocks::modulators::DAHDEnvelope<SurgeStorage, 8>]’:
surgext/src/EGxVCA.h:512:62: note: ‘pm[0]’ was declared here
  512 |                     basic_blocks::dsp::pan_laws::panmatrix_t pm;
      |                                                              ^~
In member function ‘void sst::surgext_rack::egxvca::EGxVCA::linterp::setTarget(float)’,
    inlined from ‘void sst::surgext_rack::egxvca::EGxVCA::processFastSlow(const rack::engine::Module::ProcessArgs&, const std::array<std::unique_ptr<_Tp>, 16>&) [with ENVT = sst::basic_blocks::modulators::DAHDEnvelope<SurgeStorage, 8, sst::basic_blocks::modulators::TwoMinuteRange>]’ at surgext/src/EGxVCA.h:526:45,
    inlined from ‘virtual void sst::surgext_rack::egxvca::EGxVCA::process(const rack::engine::Module::ProcessArgs&)’ at surgext/src/EGxVCA.h:692:32:
surgext/src/EGxVCA.h:430:55: warning: ‘pm[3]’ may be used uninitialized [-Wmaybe-uninitialized]
  430 |         inline void setTarget(float f) { dtarget = (f - target) * BLOCK_SIZE_INV; }
      |                                                    ~~~^~~~~~~~~
surgext/src/EGxVCA.h: In member function ‘virtual void sst::surgext_rack::egxvca::EGxVCA::process(const rack::engine::Module::ProcessArgs&)’:
surgext/src/EGxVCA.h:512:62: note: ‘pm[3]’ was declared here
  512 |                     basic_blocks::dsp::pan_laws::panmatrix_t pm;
      |                                                              ^~
In member function ‘void sst::surgext_rack::egxvca::EGxVCA::linterp::setTarget(float)’,
    inlined from ‘void sst::surgext_rack::egxvca::EGxVCA::processFastSlow(const rack::engine::Module::ProcessArgs&, const std::array<std::unique_ptr<_Tp>, 16>&) [with ENVT = sst::basic_blocks::modulators::DAHDEnvelope<SurgeStorage, 8, sst::basic_blocks::modulators::TwoMinuteRange>]’ at surgext/src/EGxVCA.h:526:45,
    inlined from ‘virtual void sst::surgext_rack::egxvca::EGxVCA::process(const rack::engine::Module::ProcessArgs&)’ at surgext/src/EGxVCA.h:692:32:
surgext/src/EGxVCA.h:430:55: warning: ‘pm[2]’ may be used uninitialized [-Wmaybe-uninitialized]
  430 |         inline void setTarget(float f) { dtarget = (f - target) * BLOCK_SIZE_INV; }
      |                                                    ~~~^~~~~~~~~
surgext/src/EGxVCA.h: In member function ‘virtual void sst::surgext_rack::egxvca::EGxVCA::process(const rack::engine::Module::ProcessArgs&)’:
surgext/src/EGxVCA.h:512:62: note: ‘pm[2]’ was declared here
  512 |                     basic_blocks::dsp::pan_laws::panmatrix_t pm;
      |                                                              ^~
In member function ‘void sst::surgext_rack::egxvca::EGxVCA::linterp::setTarget(float)’,
    inlined from ‘void sst::surgext_rack::egxvca::EGxVCA::processFastSlow(const rack::engine::Module::ProcessArgs&, const std::array<std::unique_ptr<_Tp>, 16>&) [with ENVT = sst::basic_blocks::modulators::DAHDEnvelope<SurgeStorage, 8, sst::basic_blocks::modulators::TwoMinuteRange>]’ at surgext/src/EGxVCA.h:526:45,
    inlined from ‘virtual void sst::surgext_rack::egxvca::EGxVCA::process(const rack::engine::Module::ProcessArgs&)’ at surgext/src/EGxVCA.h:692:32:
surgext/src/EGxVCA.h:430:55: warning: ‘pm[1]’ may be used uninitialized [-Wmaybe-uninitialized]
  430 |         inline void setTarget(float f) { dtarget = (f - target) * BLOCK_SIZE_INV; }
      |                                                    ~~~^~~~~~~~~
surgext/src/EGxVCA.h: In member function ‘virtual void sst::surgext_rack::egxvca::EGxVCA::process(const rack::engine::Module::ProcessArgs&)’:
surgext/src/EGxVCA.h:512:62: note: ‘pm[1]’ was declared here
  512 |                     basic_blocks::dsp::pan_laws::panmatrix_t pm;
      |                                                              ^~
In member function ‘void sst::surgext_rack::egxvca::EGxVCA::linterp::setTarget(float)’,
    inlined from ‘void sst::surgext_rack::egxvca::EGxVCA::processFastSlow(const rack::engine::Module::ProcessArgs&, const std::array<std::unique_ptr<_Tp>, 16>&) [with ENVT = sst::basic_blocks::modulators::DAHDEnvelope<SurgeStorage, 8, sst::basic_blocks::modulators::TwoMinuteRange>]’ at surgext/src/EGxVCA.h:526:45,
    inlined from ‘virtual void sst::surgext_rack::egxvca::EGxVCA::process(const rack::engine::Module::ProcessArgs&)’ at surgext/src/EGxVCA.h:692:32:
surgext/src/EGxVCA.h:430:55: warning: ‘pm[0]’ may be used uninitialized [-Wmaybe-uninitialized]
  430 |         inline void setTarget(float f) { dtarget = (f - target) * BLOCK_SIZE_INV; }
      |                                                    ~~~^~~~~~~~~
surgext/src/EGxVCA.h: In member function ‘virtual void sst::surgext_rack::egxvca::EGxVCA::process(const rack::engine::Module::ProcessArgs&)’:
surgext/src/EGxVCA.h:512:62: note: ‘pm[0]’ was declared here
  512 |                     basic_blocks::dsp::pan_laws::panmatrix_t pm;
      |                                                              ^~
In member function ‘void sst::surgext_rack::egxvca::EGxVCA::linterp::setTarget(float)’,
    inlined from ‘void sst::surgext_rack::egxvca::EGxVCA::processFastSlow(const rack::engine::Module::ProcessArgs&, const std::array<std::unique_ptr<_Tp>, 16>&) [with ENVT = sst::basic_blocks::modulators::ADSREnvelope<SurgeStorage, 8>]’ at surgext/src/EGxVCA.h:526:45,
    inlined from ‘virtual void sst::surgext_rack::egxvca::EGxVCA::process(const rack::engine::Module::ProcessArgs&)’ at surgext/src/EGxVCA.h:687:32:
surgext/src/EGxVCA.h:430:55: warning: ‘pm[3]’ may be used uninitialized [-Wmaybe-uninitialized]
  430 |         inline void setTarget(float f) { dtarget = (f - target) * BLOCK_SIZE_INV; }
      |                                                    ~~~^~~~~~~~~
surgext/src/EGxVCA.h: In member function ‘virtual void sst::surgext_rack::egxvca::EGxVCA::process(const rack::engine::Module::ProcessArgs&)’:
surgext/src/EGxVCA.h:512:62: note: ‘pm[3]’ was declared here
  512 |                     basic_blocks::dsp::pan_laws::panmatrix_t pm;
      |                                                              ^~
In member function ‘void sst::surgext_rack::egxvca::EGxVCA::linterp::setTarget(float)’,
    inlined from ‘void sst::surgext_rack::egxvca::EGxVCA::processFastSlow(const rack::engine::Module::ProcessArgs&, const std::array<std::unique_ptr<_Tp>, 16>&) [with ENVT = sst::basic_blocks::modulators::ADSREnvelope<SurgeStorage, 8>]’ at surgext/src/EGxVCA.h:526:45,
    inlined from ‘virtual void sst::surgext_rack::egxvca::EGxVCA::process(const rack::engine::Module::ProcessArgs&)’ at surgext/src/EGxVCA.h:687:32:
surgext/src/EGxVCA.h:430:55: warning: ‘pm[2]’ may be used uninitialized [-Wmaybe-uninitialized]
  430 |         inline void setTarget(float f) { dtarget = (f - target) * BLOCK_SIZE_INV; }
      |                                                    ~~~^~~~~~~~~
surgext/src/EGxVCA.h: In member function ‘virtual void sst::surgext_rack::egxvca::EGxVCA::process(const rack::engine::Module::ProcessArgs&)’:
surgext/src/EGxVCA.h:512:62: note: ‘pm[2]’ was declared here
  512 |                     basic_blocks::dsp::pan_laws::panmatrix_t pm;
      |                                                              ^~
In member function ‘void sst::surgext_rack::egxvca::EGxVCA::linterp::setTarget(float)’,
    inlined from ‘void sst::surgext_rack::egxvca::EGxVCA::processFastSlow(const rack::engine::Module::ProcessArgs&, const std::array<std::unique_ptr<_Tp>, 16>&) [with ENVT = sst::basic_blocks::modulators::ADSREnvelope<SurgeStorage, 8>]’ at surgext/src/EGxVCA.h:526:45,
    inlined from ‘virtual void sst::surgext_rack::egxvca::EGxVCA::process(const rack::engine::Module::ProcessArgs&)’ at surgext/src/EGxVCA.h:687:32:
surgext/src/EGxVCA.h:430:55: warning: ‘pm[1]’ may be used uninitialized [-Wmaybe-uninitialized]
  430 |         inline void setTarget(float f) { dtarget = (f - target) * BLOCK_SIZE_INV; }
      |                                                    ~~~^~~~~~~~~
surgext/src/EGxVCA.h: In member function ‘virtual void sst::surgext_rack::egxvca::EGxVCA::process(const rack::engine::Module::ProcessArgs&)’:
surgext/src/EGxVCA.h:512:62: note: ‘pm[1]’ was declared here
  512 |                     basic_blocks::dsp::pan_laws::panmatrix_t pm;
      |                                                              ^~
In member function ‘void sst::surgext_rack::egxvca::EGxVCA::linterp::setTarget(float)’,
    inlined from ‘void sst::surgext_rack::egxvca::EGxVCA::processFastSlow(const rack::engine::Module::ProcessArgs&, const std::array<std::unique_ptr<_Tp>, 16>&) [with ENVT = sst::basic_blocks::modulators::ADSREnvelope<SurgeStorage, 8>]’ at surgext/src/EGxVCA.h:526:45,
    inlined from ‘virtual void sst::surgext_rack::egxvca::EGxVCA::process(const rack::engine::Module::ProcessArgs&)’ at surgext/src/EGxVCA.h:687:32:
surgext/src/EGxVCA.h:430:55: warning: ‘pm[0]’ may be used uninitialized [-Wmaybe-uninitialized]
  430 |         inline void setTarget(float f) { dtarget = (f - target) * BLOCK_SIZE_INV; }
      |                                                    ~~~^~~~~~~~~
surgext/src/EGxVCA.h: In member function ‘virtual void sst::surgext_rack::egxvca::EGxVCA::process(const rack::engine::Module::ProcessArgs&)’:
surgext/src/EGxVCA.h:512:62: note: ‘pm[0]’ was declared here
  512 |                     basic_blocks::dsp::pan_laws::panmatrix_t pm;
      |                                                              ^~
In member function ‘void sst::surgext_rack::egxvca::EGxVCA::linterp::setTarget(float)’,
    inlined from ‘void sst::surgext_rack::egxvca::EGxVCA::processFastSlow(const rack::engine::Module::ProcessArgs&, const std::array<std::unique_ptr<_Tp>, 16>&) [with ENVT = sst::basic_blocks::modulators::ADSREnvelope<SurgeStorage, 8, sst::basic_blocks::modulators::TwoMinuteRange>]’ at surgext/src/EGxVCA.h:526:45,
    inlined from ‘virtual void sst::surgext_rack::egxvca::EGxVCA::process(const rack::engine::Module::ProcessArgs&)’ at surgext/src/EGxVCA.h:685:32:
surgext/src/EGxVCA.h:430:55: warning: ‘pm[3]’ may be used uninitialized [-Wmaybe-uninitialized]
  430 |         inline void setTarget(float f) { dtarget = (f - target) * BLOCK_SIZE_INV; }
      |                                                    ~~~^~~~~~~~~
surgext/src/EGxVCA.h: In member function ‘virtual void sst::surgext_rack::egxvca::EGxVCA::process(const rack::engine::Module::ProcessArgs&)’:
surgext/src/EGxVCA.h:512:62: note: ‘pm[3]’ was declared here
  512 |                     basic_blocks::dsp::pan_laws::panmatrix_t pm;
      |                                                              ^~
In member function ‘void sst::surgext_rack::egxvca::EGxVCA::linterp::setTarget(float)’,
    inlined from ‘void sst::surgext_rack::egxvca::EGxVCA::processFastSlow(const rack::engine::Module::ProcessArgs&, const std::array<std::unique_ptr<_Tp>, 16>&) [with ENVT = sst::basic_blocks::modulators::ADSREnvelope<SurgeStorage, 8, sst::basic_blocks::modulators::TwoMinuteRange>]’ at surgext/src/EGxVCA.h:526:45,
    inlined from ‘virtual void sst::surgext_rack::egxvca::EGxVCA::process(const rack::engine::Module::ProcessArgs&)’ at surgext/src/EGxVCA.h:685:32:
surgext/src/EGxVCA.h:430:55: warning: ‘pm[2]’ may be used uninitialized [-Wmaybe-uninitialized]
  430 |         inline void setTarget(float f) { dtarget = (f - target) * BLOCK_SIZE_INV; }
      |                                                    ~~~^~~~~~~~~
surgext/src/EGxVCA.h: In member function ‘virtual void sst::surgext_rack::egxvca::EGxVCA::process(const rack::engine::Module::ProcessArgs&)’:
surgext/src/EGxVCA.h:512:62: note: ‘pm[2]’ was declared here
  512 |                     basic_blocks::dsp::pan_laws::panmatrix_t pm;
      |                                                              ^~
In member function ‘void sst::surgext_rack::egxvca::EGxVCA::linterp::setTarget(float)’,
    inlined from ‘void sst::surgext_rack::egxvca::EGxVCA::processFastSlow(const rack::engine::Module::ProcessArgs&, const std::array<std::unique_ptr<_Tp>, 16>&) [with ENVT = sst::basic_blocks::modulators::ADSREnvelope<SurgeStorage, 8, sst::basic_blocks::modulators::TwoMinuteRange>]’ at surgext/src/EGxVCA.h:526:45,
    inlined from ‘virtual void sst::surgext_rack::egxvca::EGxVCA::process(const rack::engine::Module::ProcessArgs&)’ at surgext/src/EGxVCA.h:685:32:
surgext/src/EGxVCA.h:430:55: warning: ‘pm[1]’ may be used uninitialized [-Wmaybe-uninitialized]
  430 |         inline void setTarget(float f) { dtarget = (f - target) * BLOCK_SIZE_INV; }
      |                                                    ~~~^~~~~~~~~
surgext/src/EGxVCA.h: In member function ‘virtual void sst::surgext_rack::egxvca::EGxVCA::process(const rack::engine::Module::ProcessArgs&)’:
surgext/src/EGxVCA.h:512:62: note: ‘pm[1]’ was declared here
  512 |                     basic_blocks::dsp::pan_laws::panmatrix_t pm;
      |                                                              ^~
In member function ‘void sst::surgext_rack::egxvca::EGxVCA::linterp::setTarget(float)’,
    inlined from ‘void sst::surgext_rack::egxvca::EGxVCA::processFastSlow(const rack::engine::Module::ProcessArgs&, const std::array<std::unique_ptr<_Tp>, 16>&) [with ENVT = sst::basic_blocks::modulators::ADSREnvelope<SurgeStorage, 8, sst::basic_blocks::modulators::TwoMinuteRange>]’ at surgext/src/EGxVCA.h:526:45,
    inlined from ‘virtual void sst::surgext_rack::egxvca::EGxVCA::process(const rack::engine::Module::ProcessArgs&)’ at surgext/src/EGxVCA.h:685:32:
surgext/src/EGxVCA.h:430:55: warning: ‘pm[0]’ may be used uninitialized [-Wmaybe-uninitialized]
  430 |         inline void setTarget(float f) { dtarget = (f - target) * BLOCK_SIZE_INV; }
      |                                                    ~~~^~~~~~~~~
surgext/src/EGxVCA.h: In member function ‘virtual void sst::surgext_rack::egxvca::EGxVCA::process(const rack::engine::Module::ProcessArgs&)’:
surgext/src/EGxVCA.h:512:62: note: ‘pm[0]’ was declared here
  512 |                     basic_blocks::dsp::pan_laws::panmatrix_t pm;
      |                                                              ^~
Compiling surgext/src/FX.cpp
Compiling surgext/src/LFO.cpp
Compiling surgext/src/Mixer.cpp
Compiling surgext/src/ModMatrix.cpp
Compiling surgext/src/QuadAD.cpp
Compiling surgext/src/QuadLFO.cpp
Compiling surgext/src/UnisonHelper.cpp
Compiling surgext/src/VCF.cpp
Compiling surgext/src/VCO.cpp
Compiling surgext/src/Waveshaper.cpp
Compiling surgext/src/XTModule.cpp
Compiling surgext/src/XTModuleWidget.cpp
Compiling surgext/src/XTStyle.cpp
Compiling surgext/src/XTWidgets.cpp
Compiling surgext-helper/surgext-helper.cpp
@baconpaul
Copy link
Contributor

Oh yeah adding a {} there should fix it. I’ll look when I’m back from vaca

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants