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

Compile Warnings #2001

Closed
willeke1234 opened this issue Sep 5, 2024 · 0 comments · Fixed by #2053
Closed

Compile Warnings #2001

willeke1234 opened this issue Sep 5, 2024 · 0 comments · Fixed by #2053
Milestone

Comments

@willeke1234
Copy link
Contributor

The clang compiler on macOS reports the following warnings. I don't want to fix them myself because I lack the knowledge of GrandOrgue, modern C++ and scripts.

8 times:

WARNING: The convert command is deprecated in IMv7, use "magick" instead of "convert" or "magick convert"

187 times:

clang: warning: argument unused during compilation: '-mmmx' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-msse' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-msse2' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-msse3' [-Wunused-command-line-argument]

6 times:

/Users/runner/work/grandorgue/grandorgue/src/grandorgue/combinations/model/GODivisionalCombination.h:18:1: warning: class 'GOSetterState' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]
class GOSetterState;
^
/Users/runner/work/grandorgue/grandorgue/src/grandorgue/combinations/model/GOSetterState.h:11:8: note: previous use is here
struct GOSetterState {
       ^
/Users/runner/work/grandorgue/grandorgue/src/grandorgue/combinations/model/GODivisionalCombination.h:18:1: note: did you mean struct here?
class GOSetterState;
^~~~~
struct

2 times:

/Users/runner/work/grandorgue/grandorgue/src/grandorgue/combinations/model/GOSetterState.h:11:1: warning: 'GOSetterState' defined as a struct here but previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]
struct GOSetterState {
^
/Users/runner/work/grandorgue/grandorgue/src/grandorgue/combinations/GODivisionalSetter.h:28:1: note: did you mean struct here?
class GOSetterState;
^~~~~
struct

16 times:

/Users/runner/work/grandorgue/grandorgue/src/grandorgue/sound/GOSoundSamplerPool.h:15:1: warning: class 'GOSoundSampler' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]
class GOSoundSampler;
^
/Users/runner/work/grandorgue/grandorgue/src/grandorgue/sound/GOSoundSampler.h:19:8: note: previous use is here
struct GOSoundSampler {
       ^
/Users/runner/work/grandorgue/grandorgue/src/grandorgue/sound/GOSoundSamplerPool.h:15:1: note: did you mean struct here?
class GOSoundSampler;
^~~~~
struct

3 times:

/Users/runner/work/grandorgue/grandorgue/src/grandorgue/sound/GOSoundSampler.h:19:1: warning: 'GOSoundSampler' defined as a struct here but previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]
struct GOSoundSampler {
^
/Users/runner/work/grandorgue/grandorgue/src/grandorgue/model/GOTremulant.h:21:1: note: did you mean struct here?
class GOSoundSampler;
^~~~~
struct

2 times:

/Users/runner/work/grandorgue/grandorgue/src/grandorgue/sound/GOSoundSamplerPool.h:15:1: warning: class 'GOSoundSampler' was previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]
class GOSoundSampler;
^
/Users/runner/work/grandorgue/grandorgue/src/grandorgue/sound/GOSoundSampler.h:19:8: note: previous use is here
struct GOSoundSampler {
       ^
/Users/runner/work/grandorgue/grandorgue/src/grandorgue/sound/GOSoundSamplerPool.h:15:1: note: did you mean struct here?
class GOSoundSampler;

and once:

/Users/runner/work/grandorgue/grandorgue/src/core/GOChoice.h:26:5: warning: 'GOChoice<GOMidiReceiverMessageType>::GetCurrentSelection' hides overloaded virtual function [-Woverloaded-virtual]
  T GetCurrentSelection() {
    ^
/Users/runner/work/grandorgue/grandorgue/src/grandorgue/dialogs/midi-event/GOMidiEventRecvTab.cpp:77:21: note: in instantiation of template class 'GOChoice<GOMidiReceiverMessageType>' requested here
  m_eventtype = new GOChoice<GOMidiReceiverMessageType>(this, ID_EVENT);
                    ^
/opt/homebrew/include/wx-3.2/wx/choice.h:47:17: note: hidden overloaded virtual function 'wxChoiceBase::GetCurrentSelection' declared here: different return type ('int' vs 'GOMidiReceiverMessageType')
    virtual int GetCurrentSelection() const { return GetSelection(); }
                ^
/Users/runner/work/grandorgue/grandorgue/src/core/GOChoice.h:26:5: warning: 'GOChoice<GOMidiSenderMessageType>::GetCurrentSelection' hides overloaded virtual function [-Woverloaded-virtual]
  T GetCurrentSelection() {
    ^
/Users/runner/work/grandorgue/grandorgue/src/grandorgue/dialogs/midi-event/GOMidiEventSendTab.cpp:76:21: note: in instantiation of template class 'GOChoice<GOMidiSenderMessageType>' requested here
  m_eventtype = new GOChoice<GOMidiSenderMessageType>(this, ID_EVENT);
                    ^
/opt/homebrew/include/wx-3.2/wx/choice.h:47:17: note: hidden overloaded virtual function 'wxChoiceBase::GetCurrentSelection' declared here: different return type ('int' vs 'GOMidiSenderMessageType')
    virtual int GetCurrentSelection() const { return GetSelection(); }
                ^
/Users/runner/work/grandorgue/grandorgue/src/grandorgue/combinations/GODivisionalSetter.cpp:239:19: warning: unused variable 'NAME' [-Wunused-const-variable]
const char *const NAME = "name";
                  ^
/Users/runner/work/grandorgue/grandorgue/src/grandorgue/combinations/GOSetter.cpp:564:19: warning: unused variable 'CURRENT' [-Wunused-const-variable]
const char *const CURRENT = "current";
                  ^
/Users/runner/work/grandorgue/grandorgue/src/grandorgue/dialogs/settings/GOSettingsMidiDevices.cpp:64:23: warning: implicit conversion from 'double' to 'int' changes value from 0.5 to 0 [-Wliteral-conversion]
  topSizer->Add(box1, 0.5, wxEXPAND | wxALL, 5);
            ~~~       ^~~
/Users/runner/work/grandorgue/grandorgue/src/grandorgue/dialogs/GOStopsDialog.cpp:22:20: warning: unused variable 'MAX_ELEMENTS' [-Wunused-const-variable]
constexpr unsigned MAX_ELEMENTS = 2000;
                   ^
/Users/runner/work/grandorgue/grandorgue/src/grandorgue/loader/GOLoadWorker.h:30:18: warning: private field 'm_LastObject' is not used [-Wunused-private-field]
  GOCacheObject *m_LastObject;
                 ^
/Users/runner/work/grandorgue/grandorgue/src/grandorgue/midi/GOMidiShortcutReceiver.h:21:22: warning: private field 'm_OrganController' is not used [-Wunused-private-field]
  GOOrganController *m_OrganController;
                     ^
/Users/runner/work/grandorgue/grandorgue/src/core/GOChoice.h:26:5: warning: 'GOChoice<GOInitialLoadType>::GetCurrentSelection' hides overloaded virtual function [-Woverloaded-virtual]
  T GetCurrentSelection() {
    ^
/Users/runner/work/grandorgue/grandorgue/src/grandorgue/dialogs/settings/GOSettingsOptions.cpp:123:26: note: in instantiation of template class 'GOChoice<GOInitialLoadType>' requested here
    m_LoadLastFile = new GOChoice<GOInitialLoadType>(this, ID_LOAD_LAST_FILE),
                         ^
/opt/homebrew/include/wx-3.2/wx/choice.h:47:17: note: hidden overloaded virtual function 'wxChoiceBase::GetCurrentSelection' declared here: different return type ('int' vs 'GOInitialLoadType')
    virtual int GetCurrentSelection() const { return GetSelection(); }
                ^
/Users/runner/work/grandorgue/grandorgue/src/grandorgue/sound/ports/GOSoundJackPort.cpp:124:7: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
      sprintf(port_name, "out_%d", i);
      ^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/stdio.h:180:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/sys/cdefs.h:218:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
/Users/runner/work/grandorgue/grandorgue/src/grandorgue/sound/GOSoundEngine.h:57:12: warning: private field 'm_WorkerSlots' is not used [-Wunused-private-field]
  unsigned m_WorkerSlots;
           ^
/Users/runner/work/grandorgue/grandorgue/src/grandorgue/sound/GOSoundRecorder.cpp:54:6: warning: suggest braces around initialization of subobject [-Wmissing-braces]
    {m_BytesPerSample == 4 ? 3 : 1,
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     {
/Users/runner/work/grandorgue/grandorgue/src/core/ptrvector.h:28:9: warning: 'delete' applied to a pointer-to-array type 'float *[2]' treated as 'delete[]'
        delete at(i);
        ^      ~~~~~
              []
/Users/runner/work/grandorgue/grandorgue/src/grandorgue/GOOrganController.cpp:830:17: warning: variable 'i' set but not used [-Wunused-but-set-variable]
  for (unsigned i = 0; cache_save_ok; i++) {
                ^
/Users/runner/work/grandorgue/grandorgue/src/grandorgue/GODocument.cpp:152:5: warning: delete called on non-final 'GOOrganController' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor]
    delete m_OrganController;
    ^
/Users/runner/work/grandorgue/grandorgue/src/tools/GOPerfTest.cpp:191:5: warning: delete called on non-final 'GOOrganController' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor]
    delete organController;
    ^
@oleg68 oleg68 modified the milestones: 3.15.3, 3.15.4 Nov 3, 2024
oleg68 added a commit to oleg68/GrandOrgue-official that referenced this issue Nov 28, 2024
oleg68 added a commit to oleg68/GrandOrgue-official that referenced this issue Nov 28, 2024
oleg68 added a commit to oleg68/GrandOrgue-official that referenced this issue Nov 28, 2024
oleg68 added a commit to oleg68/GrandOrgue-official that referenced this issue Nov 29, 2024
oleg68 added a commit to oleg68/GrandOrgue-official that referenced this issue Nov 29, 2024
oleg68 added a commit to oleg68/GrandOrgue-official that referenced this issue Nov 30, 2024
oleg68 added a commit to oleg68/GrandOrgue-official that referenced this issue Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants