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

Build Cleanup #5956

Merged
merged 4 commits into from
Nov 9, 2024
Merged

Build Cleanup #5956

merged 4 commits into from
Nov 9, 2024

Conversation

WickedSmoke
Copy link
Contributor

These commits eliminate all the compiler warnings on my box except for the following (which I have no clue how to fix):

In file included from /home/karl/osrc/games/pioneer/src/lua/LuaObject.h:9,
                 from /home/karl/osrc/games/pioneer/src/lua/LuaEvent.h:8,
                 from /home/karl/osrc/games/pioneer/src/Ship.cpp:28:
/home/karl/osrc/games/pioneer/src/lua/LuaPushPull.h: In instantiation of ‘std::tuple<typename std::remove_reference<Args>::type ...> pi_lua_multiple_pull(lua_State*, int) [with Types = {double, double}; lua_State = lua_State]’:
/home/karl/osrc/games/pioneer/src/lua/LuaObject.h:528:60:   required from ‘static std::tuple<Ret1, Ret2, Ret ...> LuaObject<T>::CallMethod(T*, const Key&, const Args& ...) [with Ret1 = double; Ret2 = double; Ret = {}; Key = char [19]; Args = {}; T = Ship]’
/home/karl/osrc/games/pioneer/src/Ship.cpp:660:47:   required from here
/home/karl/osrc/games/pioneer/src/lua/LuaPushPull.h:168:91: warning: operation on ‘beg’ may be undefined [-Wsequence-point]
  168 |         return std::tuple<std::remove_reference_t<Types>...>{ LuaPull<Types>(l, beg++)... };
      |                                                                                           ^

src/Background.cpp Outdated Show resolved Hide resolved
src/collider/GeomTree.cpp Outdated Show resolved Hide resolved
src/collider/GeomTree.cpp Outdated Show resolved Hide resolved
Copy link
Member

@sturnclaw sturnclaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing this! We have been moving towards the use of standard sized-integer typedefs for a while, so this is a welcome change - especially moving away from signed integers in array indices.

src/collider/GeomTree.h Outdated Show resolved Hide resolved
@sturnclaw
Copy link
Member

Note that the -Wsequence-point warning is an over-zealous false-positive; expressions in an initializer-list are strongly ordered and the standard guarantees that they will be executed in a defined and consistent order. This is a GCC problem rather than an "us" problem.

@sturnclaw sturnclaw merged commit 5e06ba6 into pioneerspacesim:master Nov 9, 2024
4 checks passed
@WickedSmoke WickedSmoke deleted the cleanup branch November 9, 2024 11:34
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.

3 participants