Fixed compiler warnings regarding enum comparison.

Warnings like

  comparison of unsigned expression < 0 is always false

are reported with -Wextra when enum types that are compiled to an
unsigned type (which is up to the compiler) are checked for negativity.
This commit is contained in:
Tobias Brunner
2011-11-25 09:40:30 +01:00
parent 4f775afda9
commit edad908792
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -230,7 +230,7 @@ METHOD(processor_t, get_idle_threads, u_int,
*/
static job_priority_t sane_prio(job_priority_t prio)
{
if (prio < 0 || prio >= JOB_PRIO_MAX)
if ((int)prio < 0 || prio >= JOB_PRIO_MAX)
{
return JOB_PRIO_MAX - 1;
}