diff options
author | Brian Behlendorf <[email protected]> | 2011-02-23 12:50:05 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2011-02-23 12:52:51 -0800 |
commit | a31a70bbd1c3d6b27a68280e53103c5b9a8ebd65 (patch) | |
tree | da15e74de99c8106d907f54f29ebccb7b86e0454 /cmd | |
parent | 45066d1f20a582fc8229776503b1cdd554d7fde4 (diff) |
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.
Diffstat (limited to 'cmd')
0 files changed, 0 insertions, 0 deletions