From dfdbdc9f6d1b22eb717c8a77095dd617725022fe Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Fri, 10 Jan 2020 15:56:37 +0100 Subject: [PATCH] libtest: fix UB with va_start() --- libtest/exception/disconnected.hpp | 2 +- libtest/exception/fatal.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) { -- 2.30.2