I’m getting errors from buildbots triggering on code such as this:
aCreationMetaDateString.append(char('0' + ((aDT.Year / 1000) % 10)));
aCreationMetaDateString.append(char('0' + ((aDT.Year / 100) % 10)));
aCreationMetaDateString.append(char('0' + ((aDT.Year / 10) % 10)));
aCreationMetaDateString.append(char('0' + ((aDT.Year) % 10)));
Error is:
clang plugin stringadd did trigger. simplify by merging with the preceding
assign/append (
https://ci.libreoffice.org/job/gerrit_linux_clang_dbgutil/189822/ )
See https://gerrit.libreoffice.org/c/core/+/191122
But if you do the following:
aCreationMetaDateString.append(char('0' + ((aDT.Year / 1000) % 10))
+ char('0' + ((aDT.Year / 100) % 10))
+ char('0' + ((aDT.Year / 10) % 10))
+ char('0' + ((aDT.Year) % 10)));
Then the compiler thinks the char needs numeric addition, and doesn’t invoke
the + operator.
How does one get around this? Note this only happens with char.
Chris