diff cmd.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 e3db02d7f1f4
children 9be355e742e5
line wrap: on
line diff
--- 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;
 		}
 	}