From 534afc5997fc4bfc9425f51ce67b5abe4271f334 Mon Sep 17 00:00:00 2001 From: Tomasz Wasilczyk Date: Wed, 27 Apr 2016 21:57:39 +0100 Subject: [PATCH] Fix -Wsign-compare warnings --- protobuf-c/protobuf-c.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/protobuf-c/protobuf-c.c b/protobuf-c/protobuf-c.c index 9c0dac6..ff95024 100644 --- a/protobuf-c/protobuf-c.c +++ b/protobuf-c/protobuf-c.c @@ -285,13 +285,13 @@ int32_size(int32_t v) { if (v < 0) { return 10; - } else if (v < (1UL << 7)) { + } else if (v < (1L << 7)) { return 1; - } else if (v < (1UL << 14)) { + } else if (v < (1L << 14)) { return 2; - } else if (v < (1UL << 21)) { + } else if (v < (1L << 21)) { return 3; - } else if (v < (1UL << 28)) { + } else if (v < (1L << 28)) { return 4; } else { return 5;