Skip to content

Conversation

@martenjj
Copy link
Contributor

They do not affect the code, but give lots of diagnostic messages when compiled with -W -Wall -Wextra. The changes remove them so that other messages warning of potential problems will not be lost among the noise.

The wanings eliminated are:
"declaration shadows a member"
"use of old-style cast"
"can be marked override"
"declaration shadows a parameter"
"declaration shadows a previous local"
"implictly-declared (constructor) is deprecated"

src/common.h: In constructor 'BaseEvent::BaseEvent(SCRef, int)':
src/common.h:448: warning: declaration of 'd' shadows a member of 'BaseEvent'
/usr/include/qt5/QtCore/qcoreevent.h:313: note: shadowed declaration is here

src/common.h: In constructor 'MessageEvent::MessageEvent(SCRef)':
src/common.h:455: warning: declaration of 'd' shadows a member of 'MessageEvent'
src/common.h:457: note: in expansion of macro 'DEF_EVENT'
@tibirna
Copy link
Owner

tibirna commented Dec 3, 2022

Hello Jonathan

For my instruction, please describe in some detail your compilation setup.

I have the latest gcc (gcc-12) available for my distro, I have the compiler debug flags set to -g -W -Wall -Wextra -pedantic and I don't see all the warnings you seem to see.

I can only see the warnings you fix with your last commit.

I can understand from the code the fixes in the 2nd and 3rd commit (although I would like to also get the warnings locally, so please help me with the config).

And I don't see any reasons in the code for the 1st and 4th commit.

Thanks in advance
Cristian

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

Successfully merging this pull request may close these issues.

2 participants