aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2018-01-22 04:48:14 +0000
committerAlexander Motin <mav@FreeBSD.org>2018-01-22 04:48:14 +0000
commit1e2bad5ea0535c78fa43eb68a4cfa6260a59fcb5 (patch)
tree73f4498b718fe9704d15fa63876f30022d95e04e /lib
parent434e06c6f9363e5781c68c70d81fa717bd578c16 (diff)
downloadsrc-1e2bad5ea0535c78fa43eb68a4cfa6260a59fcb5.tar.gz
src-1e2bad5ea0535c78fa43eb68a4cfa6260a59fcb5.zip
8652 Tautological comparisons with ZPROP_INVAL
illumos/illumos-gate@4ae5f5f06c6c2d1db8167480f7d9e3b5378ba2f2 https://www.illumos.org/issues/8652: Clang and GCC prefer to use unsigned ints to store enums. With Clang, that causes tautological comparison warnings when comparing a zfs_prop_t or zpool_prop_t variable to the macro ZPROP_INVAL. It's likely that error handling code is being silently removed as a result. Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Igor Kozhukhov <igor@dilos.org> Approved by: Gordon Ross <gwr@nexenta.com> Author: Alan Somers <asomers@gmail.com>
Notes
Notes: svn path=/vendor-sys/illumos/dist/; revision=328251
Diffstat (limited to 'lib')
-rw-r--r--lib/libzfs/common/libzfs_pool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libzfs/common/libzfs_pool.c b/lib/libzfs/common/libzfs_pool.c
index 578ffcaf1f6e..d47f8704ed0a 100644
--- a/lib/libzfs/common/libzfs_pool.c
+++ b/lib/libzfs/common/libzfs_pool.c
@@ -445,7 +445,7 @@ zpool_valid_proplist(libzfs_handle_t *hdl, const char *poolname,
const char *propname = nvpair_name(elem);
prop = zpool_name_to_prop(propname);
- if (prop == ZPROP_INVAL && zpool_prop_feature(propname)) {
+ if (prop == ZPOOL_PROP_INVAL && zpool_prop_feature(propname)) {
int err;
char *fname = strchr(propname, '@') + 1;
@@ -484,7 +484,7 @@ zpool_valid_proplist(libzfs_handle_t *hdl, const char *poolname,
/*
* Make sure this property is valid and applies to this type.
*/
- if (prop == ZPROP_INVAL) {
+ if (prop == ZPOOL_PROP_INVAL) {
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
"invalid property '%s'"), propname);
(void) zfs_error(hdl, EZFS_BADPROP, errbuf);