Skip to content

GUI: Fix build warnings#87

Open
delet-this wants to merge 7 commits intoAndyFilter:masterfrom
delet-this:fix-gui-warnings
Open

GUI: Fix build warnings#87
delet-this wants to merge 7 commits intoAndyFilter:masterfrom
delet-this:fix-gui-warnings

Conversation

@delet-this
Copy link
Copy Markdown

The gui has some build warnings, let's fix them!

This shouldn't have any functional impact unless undefined behavior was causing something weird before with the sequence point ub and strict aliasing violation. I have tested that the gui works, and that the nix package still builds.

Probably not a bad idea to enable some more warnings after this, see e.g. https://github.com/cpp-best-practices/cppbestpractices/blob/master/02-Use_the_Tools_Available.md#gcc--clang.

Warnings from external headers are not very interesting for us, so let's
disable them by marking them as system includes using `-isystem`.
This warning doesn't seem that interesting to use as it would require
bunch of casting, so let's disable it for now.
#pragma comment() is for Microsoft's compiler, not useful for us.
It was undefined at which point the increment happened in these cases.
Casting an enum reference to int reference was a violation of strict
aliasing, so use a temp variable instead.
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.

1 participant