Fix enum compiler warning
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 23 Feb 2011 20:50:05 +0000 (12:50 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 23 Feb 2011 20:52:51 +0000 (12:52 -0800)
commita31a70bbd1c3d6b27a68280e53103c5b9a8ebd65
treeda15e74de99c8106d907f54f29ebccb7b86e0454
parent45066d1f20a582fc8229776503b1cdd554d7fde4
Fix enum compiler warning

Generally it's a good idea to use enums for switch statements,
but in this case it causes warning because the enum is really a
set of flags.  These flags are OR'ed together in some cases
resulting in values which are not part of the original enum.
This causes compiler warning such as this about invalid cases.

  error: case value ‘33’ not in enumerated type ‘zprop_source_t’

To handle this we simply case the enum to an int for the switch
statement.  This leaves all other enum type checking in place
and effectively disabled these warnings.
module/zfs/dsl_prop.c