diff options
author | mav <mav@FreeBSD.org> | 2018-02-18 00:26:00 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2018-02-18 00:26:00 +0000 |
commit | 85c2ffa5dc93e7798d21f93c5719282a0e7ba605 (patch) | |
tree | 381d065592ce74424f3acc63cf31f9b6df62ec50 /cddl/contrib/opensolaris/cmd | |
parent | 59e2d7e678358a8c92a7f9180315267fa5eeda83 (diff) | |
download | FreeBSD-src-85c2ffa5dc93e7798d21f93c5719282a0e7ba605.zip FreeBSD-src-85c2ffa5dc93e7798d21f93c5719282a0e7ba605.tar.gz |
MFC r328252: MFV r328251: 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>
Diffstat (limited to 'cddl/contrib/opensolaris/cmd')
-rw-r--r-- | cddl/contrib/opensolaris/cmd/zpool/zpool_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c b/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c index 99be598..06c2e25 100644 --- a/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c +++ b/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c @@ -441,7 +441,7 @@ add_prop_list(const char *propname, char *propval, nvlist_t **props, * feature@ properties and version should not be specified * at the same time. */ - if ((prop == ZPROP_INVAL && zpool_prop_feature(propname) && + if ((prop == ZPOOL_PROP_INVAL && zpool_prop_feature(propname) && nvlist_exists(proplist, vname)) || (prop == ZPOOL_PROP_VERSION && prop_list_contains_feature(proplist))) { |