From: Bartosz Golaszewski Date: Thu, 4 Dec 2014 16:27:06 +0000 (+0100) Subject: opt_to_gvar: print an error message for unsupported data types X-Git-Tag: sigrok-cli-0.6.0~48 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=b262d8f2ebd57c7131f2e274803291d82f36118f;p=sigrok-cli.git opt_to_gvar: print an error message for unsupported data types Unsupported data types are silently ignored in opt_to_gvar() switch statement. This leads to confusion as sigrok-cli just exits without giving the user any hint on what's the reason for not setting the option properly. Add an error message for unmatched data types. Signed-off-by: Bartosz Golaszewski --- diff --git a/session.c b/session.c index 0011445..7bae91a 100644 --- a/session.c +++ b/session.c @@ -404,6 +404,8 @@ int opt_to_gvar(char *key, char *value, struct sr_config *src) } break; default: + g_critical("Unknown data type specified for option '%s' " + "(driver implementation bug?).", key); ret = -1; }