From: Uwe Hermann Date: Fri, 19 Sep 2014 10:39:33 +0000 (+0200) Subject: Fix a compiler warning. X-Git-Tag: sigrok-cli-0.6.0~63 X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-cli.git;a=commitdiff_plain;h=c5136a5439708d2fc3a1cbe1e1bcc7ea17a6feac Fix a compiler warning. input.c: In function ‘load_input_file’: input.c:123:7: warning: ‘fd’ may be used uninitialized in this function [-Wmaybe-uninitialized] len = read(fd, buf->str, BUFSIZE); ^ input.c:42:6: note: ‘fd’ was declared here int fd; ^ --- diff --git a/input.c b/input.c index eb73d05..da4e21d 100644 --- a/input.c +++ b/input.c @@ -39,7 +39,7 @@ static void load_input_file_module(void) struct sr_dev_inst *sdi; GHashTable *mod_args, *mod_opts; GString *buf; - int fd; + int fd = 0; ssize_t len; char *mod_id;