[PATCH 31/34] cyclicdeadline: avoid signed vs unsigned compiler warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



src/sched_deadline/cyclicdeadline.c: In function 'do_runtime':
src/sched_deadline/cyclicdeadline.c:757:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (diff > stat->max)
           ^
src/sched_deadline/cyclicdeadline.c:759:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (!stat->min || diff < stat->min)
                         ^

Signed-off-by: Tommi Rantala <tommi.t.rantala@xxxxxxxxx>
---
 src/sched_deadline/cyclicdeadline.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/sched_deadline/cyclicdeadline.c b/src/sched_deadline/cyclicdeadline.c
index e8cc559..5fbfa13 100644
--- a/src/sched_deadline/cyclicdeadline.c
+++ b/src/sched_deadline/cyclicdeadline.c
@@ -754,9 +754,9 @@ static u64 do_runtime(struct sched_data *sd, u64 period)
 
 
 	diff = now - period;
-	if (diff > stat->max)
+	if (diff > (u64)stat->max)
 		stat->max = diff;
-	if (!stat->min || diff < stat->min)
+	if (!stat->min || diff < (u64)stat->min)
 		stat->min = diff;
 	stat->act = diff;
 	stat->avg += (double) diff;
-- 
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux