From: Aki Tuomi Date: Thu, 24 May 2018 17:16:33 +0000 (+0300) Subject: log: LOG_OPTION is not supported here X-Git-Tag: 2.3.11.2~434 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95be64c930a1ce8a2c302a4ad6dfbd74974a35d4;p=thirdparty%2Fdovecot%2Fcore.git log: LOG_OPTION is not supported here Found by coverity, introduced in d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76 --- diff --git a/src/lib/failures.h b/src/lib/failures.h index 5235edd563..1f901b32a6 100644 --- a/src/lib/failures.h +++ b/src/lib/failures.h @@ -23,6 +23,7 @@ enum log_type { LOG_TYPE_PANIC, LOG_TYPE_COUNT, + /* special case */ LOG_TYPE_OPTION }; diff --git a/src/log/log-connection.c b/src/log/log-connection.c index 3a6db8d13f..d50e822bf3 100644 --- a/src/log/log-connection.c +++ b/src/log/log-connection.c @@ -129,7 +129,6 @@ client_log_ctx(struct log_connection *log, switch (ctx->type) { case LOG_TYPE_DEBUG: case LOG_TYPE_INFO: - case LOG_TYPE_OPTION: break; case LOG_TYPE_WARNING: case LOG_TYPE_ERROR: @@ -142,6 +141,7 @@ client_log_ctx(struct log_connection *log, err.text = text; log_error_buffer_add(log->errorbuf, &err); break; + case LOG_TYPE_OPTION: case LOG_TYPE_COUNT: i_unreached(); }