comparison pwm.c @ 30:2552eec9b913

Explicitly handle all cases in switch statements
author Guido Berhoerster <guido+pwm@berhoerster.name>
date Tue, 28 Nov 2017 15:09:19 +0100
parents 00d782cb45fa
children 2a8298bafec2
comparison
equal deleted inserted replaced
29:00d782cb45fa 30:2552eec9b913
180 fprintf(stderr, "invalid macro name\n"); 180 fprintf(stderr, "invalid macro name\n");
181 if (!ctx->is_interactive) { 181 if (!ctx->is_interactive) {
182 goto out; 182 goto out;
183 } 183 }
184 goto next; 184 goto next;
185 case TOK_ERR_OK:
186 break;
185 } 187 }
186 188
187 /* expand macros */ 189 /* expand macros */
188 if (macro_expand_macros(ctx->macro_head, tokenc, tokenv, &argc, 190 if (macro_expand_macros(ctx->macro_head, tokenc, tokenv, &argc,
189 &argv) != 0) { 191 &argv) != 0) {
222 break; 224 break;
223 case CMD_SIGNAL: 225 case CMD_SIGNAL:
224 fprintf(stderr, "received signal, quitting\n"); 226 fprintf(stderr, "received signal, quitting\n");
225 case CMD_QUIT: /* FALLTHROUGH */ 227 case CMD_QUIT: /* FALLTHROUGH */
226 goto quit; 228 goto quit;
229 default:
230 break;
227 } 231 }
228 ctx->prev_cmd = cmd->full_cmd; 232 ctx->prev_cmd = cmd->full_cmd;
229 233
230 next: 234 next:
231 for (i = 0; i < argc; i++) { 235 for (i = 0; i < argc; i++) {