From c5136a5439708d2fc3a1cbe1e1bcc7ea17a6feac Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Fri, 19 Sep 2014 12:39:33 +0200 Subject: [PATCH] Fix a compiler warning. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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; ^ --- input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.30.2