fsusage: avoid syntax error due to statement-before-declaration
authorJim Meyering <meyering@redhat.com>
Thu, 19 Mar 2009 08:15:24 +0000 (09:15 +0100)
committerJim Meyering <meyering@redhat.com>
Thu, 19 Mar 2009 08:17:44 +0000 (09:17 +0100)
* lib/fsusage.c (get_fs_usage): Put warning-avoidance statement
after all declarations.  Reported by Matthew Woehlke in
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/16231

ChangeLog
lib/fsusage.c

index 86757f4..29bd643 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-03-19  Jim Meyering  <meyering@redhat.com>
+
+       fsusage: avoid syntax error due to statement-before-declaration
+       * lib/fsusage.c (get_fs_usage): Put warning-avoidance statement
+       after all declarations.  Reported by Matthew Woehlke in
+       http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/16231
+
 2009-03-18  Eric Blake  <ebb9@byu.net>
 
        build-aux/compile: sync from automake
index ade4195..db0d3bc 100644 (file)
@@ -94,7 +94,6 @@
 int
 get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp)
 {
-  (void) disk;  /* avoid argument-unused warning */
 #if defined STAT_STATVFS               /* POSIX */
 
   struct statvfs fsd;
@@ -233,6 +232,7 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp)
 
 #endif
 
+  (void) disk;  /* avoid argument-unused warning */
   return 0;
 }