svn commit: r328251 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/sys/fs vendor/illumos/dist/cmd/zpool vendor/illumos/dist/lib/libzfs/common
Alexander Motin
mav at FreeBSD.org
Mon Jan 22 04:48:16 UTC 2018
Author: mav
Date: Mon Jan 22 04:48:14 2018
New Revision: 328251
URL: https://svnweb.freebsd.org/changeset/base/328251
Log:
8652 Tautological comparisons with ZPROP_INVAL
illumos/illumos-gate at 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 at delphix.com>
Reviewed by: Igor Kozhukhov <igor at dilos.org>
Approved by: Gordon Ross <gwr at nexenta.com>
Author: Alan Somers <asomers at gmail.com>
Modified:
vendor/illumos/dist/cmd/zpool/zpool_main.c
vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c
Changes in other areas also in this revision:
Modified:
vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c
vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h
Modified: vendor/illumos/dist/cmd/zpool/zpool_main.c
==============================================================================
--- vendor/illumos/dist/cmd/zpool/zpool_main.c Mon Jan 22 04:37:04 2018 (r328250)
+++ vendor/illumos/dist/cmd/zpool/zpool_main.c Mon Jan 22 04:48:14 2018 (r328251)
@@ -440,7 +440,7 @@ add_prop_list(const char *propname, char *propval, nvl
* 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))) {
Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c
==============================================================================
--- vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Mon Jan 22 04:37:04 2018 (r328250)
+++ vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Mon Jan 22 04:48:14 2018 (r328251)
@@ -445,7 +445,7 @@ zpool_valid_proplist(libzfs_handle_t *hdl, const char
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
/*
* 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);
More information about the svn-src-all
mailing list