Skip to content
Commit 95ee3914 authored by Blue Swirl's avatar Blue Swirl
Browse files

blkdebug: fix enum comparison



The signedness of enum types depend on the compiler implementation.
Therefore the check for negative values may or may not be meaningful.

Fix by explicitly casting to a signed integer.

Since the values are also checked earlier against event_names
table, this is an internal error. Change the 'if' to 'assert'.

This also avoids a warning with GCC flag -Wtype-limits.

Signed-off-by: default avatarBlue Swirl <blauwirbel@gmail.com>
parent 603ff776
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment