From: Michael Wallner Date: Fri, 10 Jan 2020 14:56:37 +0000 (+0100) Subject: libtest: fix UB with va_start() X-Git-Tag: pre_cmake~53 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=dfdbdc9f6d1b22eb717c8a77095dd617725022fe;p=m6w6%2Flibmemcached libtest: fix UB with va_start() --- diff --git a/libtest/exception/disconnected.hpp b/libtest/exception/disconnected.hpp index fb3a2adb..6e9f4c45 100644 --- a/libtest/exception/disconnected.hpp +++ b/libtest/exception/disconnected.hpp @@ -43,7 +43,7 @@ namespace libtest { class disconnected : public libtest::exception { public: - disconnected(const char *file, int line, const char *func, const std::string&, const in_port_t port, ...); + disconnected(const char *file, int line, const char *func, const std::string&, const unsigned port, ...); disconnected(const disconnected&); diff --git a/libtest/exception/fatal.cc b/libtest/exception/fatal.cc index 21a8ca79..5a3bab5e 100644 --- a/libtest/exception/fatal.cc +++ b/libtest/exception/fatal.cc @@ -89,7 +89,7 @@ void fatal::increment_disabled_counter() throw() #pragma GCC diagnostic ignored "-Wformat-nonliteral" disconnected::disconnected(const char *file_arg, int line_arg, const char *func_arg, - const std::string& instance, const in_port_t port, ...) : + const std::string& instance, const unsigned port, ...) : libtest::exception(file_arg, line_arg, func_arg), _port(port) {