Silence gcc > 7 type-limits warning

GCC > 7 warns that the selected type of the enum makes the comparisson
unneccesary. Since the selected enum fits in an integer, the input
parameter is casted to an integer to make the comparison valid and
asserts that the enum is within valid enum values (which we know are
monotonically growing).

Change-Id: Id81799e2ac43a83b998541ce7531d2039202cd62
diff --git a/src/ethosu_pmu.c b/src/ethosu_pmu.c
index c1f5c5b..7ca35fc 100644
--- a/src/ethosu_pmu.c
+++ b/src/ethosu_pmu.c
@@ -78,12 +78,15 @@
 
 uint32_t pmu_event_value(enum ethosu_pmu_event_type event)
 {
-    if (!(event < ETHOSU_PMU_SENTINEL) || (event < 0))
+    int a = event;
+    if ((a < ETHOSU_PMU_SENTINEL) && (a >= ETHOSU_PMU_NO_EVENT))
+    {
+        return eventbyid[event];
+    }
+    else
     {
         return (uint32_t)(-1);
     }
-
-    return eventbyid[event];
 }
 
 void ethosu_pmu_driver_init(void)