From: Uwe Hermann Date: Sat, 19 May 2018 20:04:22 +0000 (+0200) Subject: hwdriver.c: Fix two scan-build warnings. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=090f1e1e5478ea15baa3731fefbd4aff9be78c77;p=libsigrok.git hwdriver.c: Fix two scan-build warnings. src/hwdriver.c: In function ‘log_key’: src/hwdriver.c:648:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] opstr = op == SR_CONF_GET ? "get" : op == SR_CONF_SET ? "set" : "list"; ^~ src/hwdriver.c: In function ‘check_key’: src/hwdriver.c:681:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] opstr = op == SR_CONF_GET ? "get" : op == SR_CONF_SET ? "set" : "list"; ^~ --- diff --git a/src/hwdriver.c b/src/hwdriver.c index f5b5b257..36130625 100644 --- a/src/hwdriver.c +++ b/src/hwdriver.c @@ -635,7 +635,8 @@ SR_PRIV int sr_dev_acquisition_stop(struct sr_dev_inst *sdi) } static void log_key(const struct sr_dev_inst *sdi, - const struct sr_channel_group *cg, uint32_t key, int op, GVariant *data) + const struct sr_channel_group *cg, uint32_t key, unsigned int op, + GVariant *data) { const char *opstr; const struct sr_key_info *srci; @@ -657,7 +658,7 @@ static void log_key(const struct sr_dev_inst *sdi, static int check_key(const struct sr_dev_driver *driver, const struct sr_dev_inst *sdi, const struct sr_channel_group *cg, - uint32_t key, int op, GVariant *data) + uint32_t key, unsigned int op, GVariant *data) { const struct sr_key_info *srci; gsize num_opts, i;