# HG changeset patch # User Guido Berhoerster # Date 1511878159 -3600 # Node ID 2552eec9b91384163b7f17a3fb6deee59a24deac # Parent 00d782cb45facdcc9441086a80b8d4b94f494bc1 Explicitly handle all cases in switch statements diff -r 00d782cb45fa -r 2552eec9b913 cmd.c --- a/cmd.c Thu Sep 28 10:06:59 2017 +0200 +++ b/cmd.c Tue Nov 28 15:09:19 2017 +0100 @@ -308,6 +308,8 @@ case TOK_ERR_INVALID_MACRO_NAME: pwm_err(ctx, "invalid macro name referenced in macro"); goto out; + case TOK_ERR_OK: + break; } /* parse macro definition */ @@ -322,6 +324,8 @@ case MACRO_ERR_RECURSIVE: pwm_err(ctx, "macro definition must not be recursive"); goto out; + case MACRO_ERR_OK: + break; } macro_add(ctx->macro_head, macro_entry); @@ -565,6 +569,8 @@ case IO_PASSWORD_MISMATCH: pwm_err(ctx, "passwords do not match"); continue; + default: + break; } } diff -r 00d782cb45fa -r 2552eec9b913 pwm.c --- a/pwm.c Thu Sep 28 10:06:59 2017 +0200 +++ b/pwm.c Tue Nov 28 15:09:19 2017 +0100 @@ -182,6 +182,8 @@ goto out; } goto next; + case TOK_ERR_OK: + break; } /* expand macros */ @@ -224,6 +226,8 @@ fprintf(stderr, "received signal, quitting\n"); case CMD_QUIT: /* FALLTHROUGH */ goto quit; + default: + break; } ctx->prev_cmd = cmd->full_cmd; diff -r 00d782cb45fa -r 2552eec9b913 pwmrc.c --- a/pwmrc.c Thu Sep 28 10:06:59 2017 +0200 +++ b/pwmrc.c Tue Nov 28 15:09:19 2017 +0100 @@ -115,6 +115,8 @@ goto out; } goto next; + case TOK_ERR_OK: + break; } /* expand macros */