From: Aurelien Jacobs Date: Tue, 3 Jun 2014 14:46:03 +0000 (+0200) Subject: fix a potential use of uninitialized variable X-Git-Tag: sigrok-cli-0.6.0~99 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=50c641aab7c4400393b7d2ab6be9267e3fa1eac7;p=sigrok-cli.git fix a potential use of uninitialized variable show.c: In function ‘show_dev_detail’: show.c:214:11: warning: ‘c’ may be used uninitialized in this function [-Wmaybe-uninitialized] char *s, c; ^ --- diff --git a/show.c b/show.c index bece7e6..4cdf704 100644 --- a/show.c +++ b/show.c @@ -316,8 +316,12 @@ void show_dev_detail(void) case SR_TRIGGER_UNDER: c = 'u'; break; + default: + c = 0; + break; } - printf("%c ", c); + if (c) + printf("%c ", c); } printf("\n"); g_variant_unref(gvar_list);