diff --git a/node/Bond.cpp b/node/Bond.cpp index eb63e38be..e0f56e903 100644 --- a/node/Bond.cpp +++ b/node/Bond.cpp @@ -1724,11 +1724,11 @@ void Bond::dumpPathStatus(int64_t now, int pathIdx) std::string aliveOrDead = _paths[pathIdx].alive ? std::string("alive") : std::string("dead"); std::string eligibleOrNot = _paths[pathIdx].eligible ? std::string("eligible") : std::string("ineligible"); std::string bondedOrNot = _paths[pathIdx].bonded ? std::string("bonded") : std::string("unbonded"); - log("path[%2d] --- %5s (in %7d, out: %7d), %10s, %8s, flows=%-6d lat=%-8.3f pdv=%-7.3f err=%-6.4f loss=%-6.4f alloc=%-3d --- (%s)", + log("path[%2d] --- %5s (in %7lld, out: %7lld), %10s, %8s, flows=%-6d lat=%-8.3f pdv=%-7.3f err=%-6.4f loss=%-6.4f alloc=%-3d --- (%s)", pathIdx, aliveOrDead.c_str(), - _paths[pathIdx].p->age(now), - (now - _paths[pathIdx].p->_lastOut), + static_cast(_paths[pathIdx].p->age(now)), + static_cast(now - _paths[pathIdx].p->_lastOut), eligibleOrNot.c_str(), bondedOrNot.c_str(), _paths[pathIdx].assignedFlowCount, diff --git a/node/Bond.hpp b/node/Bond.hpp index 1c2153bae..d58df4489 100644 --- a/node/Bond.hpp +++ b/node/Bond.hpp @@ -1141,6 +1141,9 @@ class Bond { * */ void log(const char* fmt, ...) +#ifdef __GNUC__ + __attribute__((format(printf, 2, 3))) +#endif { #ifdef ZT_TRACE time_t rawtime; @@ -1170,6 +1173,9 @@ class Bond { * */ void debug(const char* fmt, ...) +#ifdef __GNUC__ + __attribute__((format(printf, 2, 3))) +#endif { #ifdef ZT_DEBUG time_t rawtime;