Page MenuHomeWildfire Games

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

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


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

I believe a c_str() is missing in rP22558.

Test Plan

Compile on clang

Diff Detail

rP 0 A.D. Public Repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

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

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

Link to build:

elexis accepted this revision.Jul 27 2019, 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.Jul 27 2019, 4:41 PM
elexis edited the summary of this revision. (Show Details)Jul 27 2019, 4:41 PM
This revision was automatically updated to reflect the committed changes.