From 1a33c6b07a20af27b23f62f5c88a422eb96e463c Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 14 Jan 2013 05:25:19 -0600 Subject: Silence deeply stupid gcc warning. (First non-declaration line of function: if (file) ffd = open(); at end of of function: if (file) close(ffd); "file" is an argument to the function and nothing else assigns to it. gcc warning on that close, "ffd may be used uninitialized!" _HOW_?) --- toys/other/losetup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toys/other/losetup.c b/toys/other/losetup.c index b455f355..d279c2ad 100644 --- a/toys/other/losetup.c +++ b/toys/other/losetup.c @@ -61,7 +61,7 @@ todo: basic /dev file association static void loopback_setup(char *device, char *file) { struct loop_info64 *loop = (void *)(toybuf+32); - int lfd = -1, ffd; + int lfd = -1, ffd = ffd; unsigned flags = toys.optflags; // Open file (ffd) and loop device (lfd) -- cgit v1.2.3