telepathy-mission-control: tests: avoid an out-of-range int literal

Simon McVittie smcv at kemper.freedesktop.org
Tue Apr 30 05:13:50 PDT 2013


Module: telepathy-mission-control
Branch: master
Commit: c244460e5179ac4089fcb3a2c1c1949fdbf20a35
URL:    http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=c244460e5179ac4089fcb3a2c1c1949fdbf20a35

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Tue Apr 30 12:49:23 2013 +0100

tests: avoid an out-of-range int literal

In this particular test case, the expected result according to the flags
is "it fails", so the second column (expected converted value) is not
relevant.

This apparently causes build warnings (fatal by default) on ILP32
platforms, because 2147483648 is out-of-range for a signed int or
signed long on such platforms. It's certainly also out-of-range for
the struct member it's initializing, which is a gint32.

Signed-off-by: Simon McVittie <simon.mcvittie at collabora.co.uk>
Reviewed-by: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=64083

---

 tests/keyfile.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tests/keyfile.c b/tests/keyfile.c
index df891ce..93188ee 100644
--- a/tests/keyfile.c
+++ b/tests/keyfile.c
@@ -102,7 +102,7 @@ struct {
     { "001", 1, NOT_NORMALIZED },
     { "042", 42, NOT_NORMALIZED },
     { "2147483647", 2147483647, 0 },
-    { "2147483648", 2147483648, FAILS },
+    { "2147483648", 0, FAILS },
     { NULL, 0, 0 }
 };
 



More information about the telepathy-commits mailing list