[Piglit] [PATCH 1/4] util: Fix a -Wtautological-compare warning
Chad Versace
chad.versace at linux.intel.com
Wed Jul 9 14:47:49 PDT 2014
tests/util/piglit-log.c: warning: comparison of unsigned enum \
expression < 0 is always false [-Wtautological-compare]
return opt < 0 || opt > PIGLIT_LOG_OPT_MAX;
~~~ ^ ~
Fix the warning by removing the dead comparison.
Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---
tests/util/piglit-log.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/util/piglit-log.c b/tests/util/piglit-log.c
index 99d13d3..ec5afcd 100644
--- a/tests/util/piglit-log.c
+++ b/tests/util/piglit-log.c
@@ -60,7 +60,7 @@ get_env_overrides(void)
static bool
is_opt_oob(enum piglit_log_opt opt)
{
- return opt < 0 || opt > PIGLIT_LOG_OPT_MAX;
+ return opt > PIGLIT_LOG_OPT_MAX;
}
intptr_t
--
2.0.0
More information about the Piglit
mailing list