mirror_zfs/lib
Brian Behlendorf 31864e3d8c
OpenZFS 8652 - Tautological comparisons with ZPROP_INVAL
usr/src/uts/common/sys/fs/zfs.h
	Change ZPROP_INVAL and ZPROP_CONT from macros to enum values.  Clang
	and GCC both prefer to use unsigned ints to store enums.  That was
	causing tautological comparison warnings (and likely eliminating
	error handling code at compile time) whenever a zfs_prop_t or
	zpool_prop_t was compared to ZPROP_INVAL or ZPROP_CONT.  Making the
	error flags be explicity enum values forces the enum types to be
	signed.

	ZPROP_INVAL was also compared against two different enum types.  I
	had to change its name to ZPOOL_PROP_INVAL whenever its compared to
	a zpool_prop_t.  There are still some places where ZPROP_INVAL or
	ZPROP_CONT is compared to a plain int, in code that doesn't know
	whether the int is storing a zfs_prop_t or a zpool_prop_t.

usr/src/uts/common/fs/zfs/spa.c
	s/ZPROP_INVAL/ZPOOL_PROP_INVAL/

Authored by: Alan Somers <asomers@gmail.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Reviewed by: George Melikov <mail@gmelikov.ru>
Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>

OpenZFS-issue: https://www.illumos.org/issues/8652
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/c2de80dc74
Closes #7061
2018-01-19 09:22:37 -08:00
..
libavl Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
libefi Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
libicp Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
libnvpair Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
libshare Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
libspl Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
libtpool Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
libunicode Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
libuutil Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
libzfs OpenZFS 8652 - Tautological comparisons with ZPROP_INVAL 2018-01-19 09:22:37 -08:00
libzfs_core Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
libzpool Force ztest to always use /dev/urandom 2018-01-12 09:36:26 -08:00
Makefile.am Add libtpool (thread pools) 2017-08-09 15:31:08 -07:00