Get rid of format warnings

release/4.3a0
Frank Dellaert 2023-02-05 16:00:51 -08:00
parent 4c9743457c
commit 80d0362e0f
2 changed files with 3 additions and 2 deletions

View File

@ -72,7 +72,8 @@ void LabeledSymbol::print(const std::string& s) const {
/* ************************************************************************* */
LabeledSymbol::operator std::string() const {
char buffer[100];
snprintf(buffer, 100, "%c%c%lu", c_, label_, j_);
snprintf(buffer, 100, "%c%c%llu", c_, label_,
static_cast<unsigned long long>(j_));
return std::string(buffer);
}

View File

@ -57,7 +57,7 @@ bool Symbol::equals(const Symbol& expected, double tol) const {
Symbol::operator std::string() const {
char buffer[10];
snprintf(buffer, 10, "%c%lu", c_, j_);
snprintf(buffer, 10, "%c%llu", c_, static_cast<unsigned long long>(j_));
return std::string(buffer);
}