]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
log: Prevent LOG_TYPE_COUNT in client_log_ctx
authorAki Tuomi <aki.tuomi@dovecot.fi>
Tue, 2 Jan 2018 07:49:40 +0000 (09:49 +0200)
committerAki Tuomi <aki.tuomi@dovecot.fi>
Tue, 2 Jan 2018 12:48:05 +0000 (14:48 +0200)
Makes static analyzers happy

src/log/log-connection.c

index e117c2b184225ab31390467b38d3eeabc9388991..28ee424f3cb95f9f12f5e0e9ef6c4eb9bb41c7af 100644 (file)
@@ -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_COUNT:
        case LOG_TYPE_OPTION:
                break;
        case LOG_TYPE_WARNING:
@@ -143,6 +142,8 @@ client_log_ctx(struct log_connection *log,
                err.text = text;
                log_error_buffer_add(log->errorbuf, &err);
                break;
+       case LOG_TYPE_COUNT:
+               i_unreached();
        }
        i_set_failure_prefix("%s", prefix);
        i_log_type(ctx, "%s", text);