Build fixes for GCC 15.3 and PUC Lua 5.1.5#6
Open
niklata wants to merge 9 commits into
Open
Conversation
The existing construct is very dubious, since it creates a std::string temporary and then takes it by reference. GCC warns about it, and it may be UB.
I didn't investigate this deeply, so for now I just commented out the function in question.
Silences a warning with recent GCCs that default to C++20.
tile_color has a constructor so this isn't valid. Fix memset() by simply providing a default constructor that zero-initializes. Fix memcpy() by hand-writing a copy loop that uses the copy assignment operator.
There's two issues. First, the returned reference from the copy assignment operator must not be const. Second, the intention of the existing definition is to define a default copy assignment operator, so just use that.
Owner
|
Thank you! I'll take a look at these when I get a chance. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These are a small pile of mostly trivial fixes I had to make in order to build Stoat Soup on an up-to-date, mostly-stable amd64 Gentoo install.
The update from luaL_openlib() to luaL_register() is to stop using a long-deprecated API that is removed in Lua 5.1.5 and perhaps prior versions. Stoat Soup fails to build for me without this commit applied.
The other commits are to silence warnings that often point to invalid or deprecated C++ constructs. There are eight of these commits because I've broken them out to make them easier to verify as being correct.
With all of these commits applied, Stoat Soup builds for me with no warnings.
No AI was used for any of these commits.