changeset 788:a94ca6ee780f

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_?)
author Rob Landley <rob@landley.net>
date Mon, 14 Jan 2013 05:25:19 -0600
parents 0ef095b63a66
children 9a6b08e7fe94
files toys/other/losetup.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/toys/other/losetup.c	Sun Jan 13 13:48:25 2013 -0600
+++ b/toys/other/losetup.c	Mon Jan 14 05:25:19 2013 -0600
@@ -61,7 +61,7 @@
 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)