-Wstringop-truncation was introduced in gcc 8 and it is triggered for one line in the code.
It's not broken, since the \n is intentionally omitted. The warning shall vanish without the warning being disabled though.
Details
Details
- Reviewers
- None
- Commits
- rP22626: Fix gcc 8 compiler warning in FileIo.cpp about truncating use of strncpy…
- Trac Tickets
- #5294
Ensure that the code behavior is the same:
This can be achieved by backing up a PMP file, overwriting it in atlas, seeing that the contents didn't change.
Fun fact: If one passes a number smaller than three, then the according substring is copied and the rest of the 4 bytes are zeroes.
Diff Detail
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Comment Actions
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/338/display/redirect