From 2bb914b21ef15e357a63b0f767dfd46072cef97f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Mon, 9 Mar 2020 07:22:46 +0200 Subject: [PATCH] Fix param_type_to_str Duration wasn't in the switch. Removing the default case allows this to be detected at compile time. --- server/core/config.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/server/core/config.cc b/server/core/config.cc index ae5e15294..c87cd1b6e 100644 --- a/server/core/config.cc +++ b/server/core/config.cc @@ -3160,10 +3160,15 @@ const char* param_type_to_str(const MXS_MODULE_PARAM* params, const char* name) case MXS_MODULE_PARAM_PATH: return "a path to a file"; - default: - mxb_assert_message(!true, "Unknown parameter type"); - return ""; + case MXS_MODULE_PARAM_DURATION: + return "a duration"; } + + mxb_assert_message(!true, + "Unknown parameter type: dec %d hex %x", + params[i].type, + params[i].type); + return ""; } }