From 5383875500e932e56228ef220d501b759e4563ae Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 16 Dec 2008 13:19:01 -0800 Subject: [PATCH 1/2] Create gcc-shadow branch --- .topdeps | 1 + .topmsg | 6 ++++++ lib/libzfs/libzfs_dataset.c | 10 +++++----- 3 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 .topdeps create mode 100644 .topmsg diff --git a/.topdeps b/.topdeps new file mode 100644 index 0000000000..1f7391f92b --- /dev/null +++ b/.topdeps @@ -0,0 +1 @@ +master diff --git a/.topmsg b/.topmsg new file mode 100644 index 0000000000..a4ccc94900 --- /dev/null +++ b/.topmsg @@ -0,0 +1,6 @@ +From: Brian Behlendorf +Subject: [PATCH] gcc shadow + +Gcc -Wall warn: 'shadows a global declaration' + +Signed-off-by: Brian Behlendorf diff --git a/lib/libzfs/libzfs_dataset.c b/lib/libzfs/libzfs_dataset.c index a8005ffc0c..1f740057a7 100644 --- a/lib/libzfs/libzfs_dataset.c +++ b/lib/libzfs/libzfs_dataset.c @@ -528,14 +528,14 @@ zfs_close(zfs_handle_t *zhp) } int -zfs_spa_version(zfs_handle_t *zhp, int *spa_version) +zfs_spa_version(zfs_handle_t *zhp, int *version) { zpool_handle_t *zpool_handle = zhp->zpool_hdl; if (zpool_handle == NULL) return (-1); - *spa_version = zpool_get_prop_int(zpool_handle, + *version = zpool_get_prop_int(zpool_handle, ZPOOL_PROP_VERSION, NULL); return (0); } @@ -546,12 +546,12 @@ zfs_spa_version(zfs_handle_t *zhp, int *spa_version) static int zfs_which_resv_prop(zfs_handle_t *zhp, zfs_prop_t *resv_prop) { - int spa_version; + int version; - if (zfs_spa_version(zhp, &spa_version) < 0) + if (zfs_spa_version(zhp, &version) < 0) return (-1); - if (spa_version >= SPA_VERSION_REFRESERVATION) + if (version >= SPA_VERSION_REFRESERVATION) *resv_prop = ZFS_PROP_REFRESERVATION; else *resv_prop = ZFS_PROP_RESERVATION; From 1cc99f79a3cccf4362e5e6a4bbbb2d4fba23ae5c Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 16 Dec 2008 13:19:25 -0800 Subject: [PATCH 2/2] New TopGit dependency: gcc-shadow --- .topdeps | 1 + 1 file changed, 1 insertion(+) diff --git a/.topdeps b/.topdeps index d00bde8066..e3260fcb05 100644 --- a/.topdeps +++ b/.topdeps @@ -7,3 +7,4 @@ gcc-missing-case gcc-no-parenthesis gcc-uninit gcc-unused +gcc-shadow