]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
mount: fix compiler warning [-Wunused-parameter]
authorKarel Zak <kzak@redhat.com>
Thu, 8 Sep 2011 17:54:22 +0000 (19:54 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 8 Sep 2011 17:54:22 +0000 (19:54 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
mount/fstab.c
mount/mount.c

index 2331a7d82660be992d62810b39461764773e0c92..8d88f680dd609426f3f7151c3e9bd41d686a607d 100644 (file)
@@ -1040,13 +1040,38 @@ update_mtab (const char *dir, struct my_mntent *instead) {
  *  number and writes the number back to the file.
  */
 /* dummy */
-char *fsprobe_get_label_by_devname(const char *spec) { return NULL; }
-char *fsprobe_get_uuid_by_devname(const char *spec) { return NULL; }
-int fsprobe_parse_spec(const char *spec, char **name, char **value) { return 0; }
-struct my_mntent *my_getmntent (mntFILE *mfp) { return NULL; }
-mntFILE *my_setmntent (const char *file, char *mode) { return NULL; }
-void my_endmntent (mntFILE *mfp) { }
-int my_addmntent (mntFILE *mfp, struct my_mntent *mnt) { return 0; }
+char *fsprobe_get_label_by_devname(const char *spec __attribute((__unused__)))
+{
+       return NULL;
+}
+char *fsprobe_get_uuid_by_devname(const char *spec __attribute((__unused__)))
+{
+       return NULL;
+}
+int fsprobe_parse_spec(const char *spec __attribute((__unused__)),
+                      char **name __attribute((__unused__)),
+                      char **value __attribute((__unused__)))
+{
+       return 0;
+}
+struct my_mntent *my_getmntent (mntFILE *mfp __attribute((__unused__)))
+{
+       return NULL;
+}
+mntFILE *my_setmntent (const char *file __attribute((__unused__)),
+                      char *mode __attribute((__unused__)))
+{
+       return NULL;
+}
+void my_endmntent (mntFILE *mfp __attribute((__unused__)))
+{
+       /* nothing */
+}
+int my_addmntent (mntFILE *mfp __attribute((__unused__)),
+                 struct my_mntent *mnt __attribute((__unused__)))
+{
+       return 0;
+}
 
 int
 main(int argc, char **argv)
index 5066abc4423e95b7660904fb9d7e8d60dec297e2..e5e781f816673899ff49f68cd373534c6d59859f 100644 (file)
@@ -2020,11 +2020,15 @@ mount_one (const char *spec, const char *node, const char *types,
 
 #ifdef HAVE_LIBMOUNT_MOUNT
 static struct libmnt_table *minfo;     /* parsed mountinfo file */
-#endif
 
 /* Check if an fsname/dir pair was already in the old mtab.  */
 static int
 mounted (const char *spec0, const char *node0, struct mntentchn *fstab_mc) {
+#else
+static int
+mounted (const char *spec0, const char *node0,
+        struct mntentchn *fstab_mc __attribute__((__unused__))) {
+#endif
        struct mntentchn *mc, *mc0;
        const char *spec, *node;
        int ret = 0;