Page MenuHomeWildfire Games

Clang errors following rP22558: Cannot pass object of non-trivial type 'CStr8' through variadic function; call will abort at runtime
ClosedPublic

Authored by wraitii on Sat, Jul 27, 4:29 PM.

Details

Reviewers
elexis
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP22561: Fix rP22558 - clang-specific error at compilation time
Summary

I believe a c_str() is missing in rP22558.

Test Plan

Compile on clang

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

wraitii created this revision.Sat, Jul 27, 4:29 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/246/display/redirect

elexis accepted this revision.Sat, Jul 27, 4:41 PM
elexis added a subscriber: elexis.

Thanks for the catch and patch.

(I was wondering whether these statements in MapGenerator.cpp had it also missing, as I most often saw it with c_str, but apparently that uses fmt::sprintf supporting strings (source/third_party/cppformat/):

16187 philip LOGMESSAGE("Loading RMS '%s'", m_ScriptPath.string8());
16187 philip LOGERROR("CMapGeneratorWorker::Run: Failed to load RMS '%s'", m_ScriptPath.string8());
22466 elexis LOGERROR("Could not load heightmap file '%s'", filename.string8());

)

This revision is now accepted and ready to land.Sat, Jul 27, 4:41 PM
elexis edited the summary of this revision. (Show Details)Sat, Jul 27, 4:41 PM
This revision was automatically updated to reflect the committed changes.