Skip to content

Pathfinder Command: fix GCC 15 -Wnonnull warning #3538

Merged
Ghabry merged 2 commits into
EasyRPG:masterfrom
staticssleever668:refactor_fix_gcc15_warning
May 1, 2026
Merged

Pathfinder Command: fix GCC 15 -Wnonnull warning #3538
Ghabry merged 2 commits into
EasyRPG:masterfrom
staticssleever668:refactor_fix_gcc15_warning

Conversation

@staticssleever668

Copy link
Copy Markdown
Contributor

event_id_ignore_list.begin() pointed at an empty vector. I don't have a game to test this with, but it looks like it should not have worked before.

@Ghabry

Ghabry commented Apr 23, 2026

Copy link
Copy Markdown
Member

uhm thanks for your contribution. I'm curious and will check what happens in the upstream code right now first o_O

@Ghabry

Ghabry commented Apr 25, 2026

Copy link
Copy Markdown
Member

Jenkins: test this please

@Ghabry Ghabry added this to the 0.8.2 milestone Apr 25, 2026
@Ghabry

Ghabry commented Apr 25, 2026

Copy link
Copy Markdown
Member

Yeah this does indeed crash.

Unfortunately your assignment does not compile. We have some platforms (notable 3DS) where int32_t != int

https://ci.easyrpg.org/job/player-3ds-pr/592/console


(Besides, but thats something for me to fix, I noticed that in general that code doesn't do what is intended. When you e.g. pass in "Variable 5" this should start reading the array from location 5. Instead it dereferences the Variable and then starts the array their.)

@staticssleever668 staticssleever668 force-pushed the refactor_fix_gcc15_warning branch from baabadd to 4aef33b Compare April 25, 2026 10:13
@staticssleever668

Copy link
Copy Markdown
Contributor Author

Replaced assignment with std::back_inserter which happily allows narrowing conversions as demonstrated by this snippet:

	std::vector<int8_t> into;
	std::vector<int64_t> from;
	std::copy(from.begin(), from.end(), std::back_inserter(into));

I don't know whether checking that the value fits makes sense in this context. I assume int on 3DS is 16 bits-big if not 32.

@Ghabry

Ghabry commented Apr 25, 2026

Copy link
Copy Markdown
Member

Jenkins: Test this please

Actually it is 32 Bit. Its just on most systems int32_t == int but on 3DS it is int32_t == long int 😅

@Ghabry Ghabry merged commit 155c881 into EasyRPG:master May 1, 2026
17 checks passed
@staticssleever668 staticssleever668 deleted the refactor_fix_gcc15_warning branch May 1, 2026 15:21
sevenc-nanashi pushed a commit to sevenc-nanashi/easyrpg-player that referenced this pull request May 31, 2026
…cc15_warning

Pathfinder Command: fix GCC 15 -Wnonnull warning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants