summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjak1 <jak1@themanaworld.org>2023-08-17 00:12:24 +0200
committerjak1 <jak1@themanaworld.org>2023-08-17 00:12:24 +0200
commit19dc75e9c2d6c94cc1975ae790af35e50e667ae0 (patch)
tree2d0085ad8491aa0bce1352c8765ab05d5edaa134
parent3441603804b740f560f2ddddce8bc56231a1e901 (diff)
downloadmplint-19dc75e9c2d6c94cc1975ae790af35e50e667ae0.tar.gz
mplint-19dc75e9c2d6c94cc1975ae790af35e50e667ae0.tar.bz2
mplint-19dc75e9c2d6c94cc1975ae790af35e50e667ae0.tar.xz
mplint-19dc75e9c2d6c94cc1975ae790af35e50e667ae0.zip
fix std C++03 removed brackets from va_list (compiler warning)
added missing cstdint header to stringutils (compiler error: uint32_t)
-rw-r--r--src/stringutils.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/stringutils.cpp b/src/stringutils.cpp
index e903941..dacf692 100644
--- a/src/stringutils.cpp
+++ b/src/stringutils.cpp
@@ -26,6 +26,7 @@
#include <cctype>
#include <cstdarg>
#include <cstdio>
+#include <cstdint>
#include <ctime>
#include <list>
@@ -87,7 +88,7 @@ const char *ipToString(const uint32_t address)
std::string strprintf(const char *const format, ...)
{
char buf[257];
- va_list(args);
+ va_list args;
va_start(args, format);
size_t nb = vsnprintf(buf, 256, format, args);
buf[256] = 0;