From: Karel Zak Date: Thu, 8 Sep 2011 17:54:22 +0000 (+0200) Subject: mount: fix compiler warning [-Wunused-parameter] X-Git-Tag: v2.21-rc1~455 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bb6f91636c66ab963d37ef81d38202956b7a79e0;p=thirdparty%2Futil-linux.git mount: fix compiler warning [-Wunused-parameter] Signed-off-by: Karel Zak --- diff --git a/mount/fstab.c b/mount/fstab.c index 2331a7d826..8d88f680dd 100644 --- a/mount/fstab.c +++ b/mount/fstab.c @@ -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) diff --git a/mount/mount.c b/mount/mount.c index 5066abc442..e5e781f816 100644 --- a/mount/mount.c +++ b/mount/mount.c @@ -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;