gdbus-serialization test: don't left-shift a negative number

-2LL<<34 is undefined, because left-shifting a negative number is
undefined (it was implementation-defined behaviour in C99, but
is formally undefined in C11). The undefined behaviour sanitizer
picks this up.

Signed-off-by: Simon McVittie <smcv@debian.org>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=775510
Reviewed-by: Colin Walters
This commit is contained in:
Simon McVittie 2016-12-02 10:06:23 +00:00
parent e5ed410c8c
commit 663e12feca

View File

@ -650,7 +650,7 @@ message_serialize_basic (void)
60000,
-44,
100000,
-G_GINT64_CONSTANT(2)<<34,
-(G_GUINT64_CONSTANT(2)<<34),
G_GUINT64_CONSTANT(0xffffffffffffffff),
42.5),
"value 0: string: 'this is a string'\n"