diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2015-01-13 21:23:43 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2015-01-13 21:23:43 +0100 |
commit | 11ba04935b43d92db7a372f949ffcfb8c3538085 (patch) | |
tree | 8c5b4be9f6e923b1a966de583fa41362c49ee055 | |
parent | a233c0d5ac52e1547c5602ca1b51d9c913408f7b (diff) | |
download | external_libqmi-11ba04935b43d92db7a372f949ffcfb8c3538085.zip external_libqmi-11ba04935b43d92db7a372f949ffcfb8c3538085.tar.gz external_libqmi-11ba04935b43d92db7a372f949ffcfb8c3538085.tar.bz2 |
libqmi-glib,test: fix compilation warnings in 32bit systems
CC test_message-test-message.o
cc1: warnings being treated as errors
test-message.c: In function 'test_message_tlv_rw_64':
test-message.c:702: error: integer constant is too large for 'long' type
test-message.c:707: error: integer constant is too large for 'long' type
test-message.c:712: error: integer constant is too large for 'long' type
test-message.c:717: error: integer constant is too large for 'long' type
test-message.c:745: error: integer constant is too large for 'long' type
test-message.c:750: error: integer constant is too large for 'long' type
test-message.c:755: error: integer constant is too large for 'long' type
test-message.c:760: error: integer constant is too large for 'long' type
test-message.c: In function 'test_message_tlv_rw_sized':
test-message.c:790: error: integer constant is too large for 'long' type
test-message.c: In function 'test_message_tlv_rw_mixed':
test-message.c:1037: error: integer constant is too large for 'long' type
test-message.c:1042: error: integer constant is too large for 'long' type
test-message.c:1106: error: integer constant is too large for 'long' type
test-message.c:1111: error: integer constant is too large for 'long' type
test-message.c: In function 'test_message_tlv_write_overflow':
test-message.c:1169: error: integer constant is too large for 'long' type
test-message.c:1174: error: integer constant is too large for 'long' type
make[4]: *** [test_message-test-message.o] Error 1
-rw-r--r-- | src/libqmi-glib/test/test-message.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/libqmi-glib/test/test-message.c b/src/libqmi-glib/test/test-message.c index c19a6be..d124bfb 100644 --- a/src/libqmi-glib/test/test-message.c +++ b/src/libqmi-glib/test/test-message.c @@ -699,22 +699,22 @@ test_message_tlv_rw_64 (void) /* Add one of each */ expected_tlv_payload_size += 8; - ret = qmi_message_tlv_write_guint64 (self, QMI_ENDIAN_LITTLE, 0x1212121212121212, &error); + ret = qmi_message_tlv_write_guint64 (self, QMI_ENDIAN_LITTLE, 0x1212121212121212ULL, &error); g_assert_no_error (error); g_assert (ret); expected_tlv_payload_size += 8; - ret = qmi_message_tlv_write_gint64 (self, QMI_ENDIAN_LITTLE, 0 - 0x1212121212121212, &error); + ret = qmi_message_tlv_write_gint64 (self, QMI_ENDIAN_LITTLE, 0 - 0x1212121212121212LL, &error); g_assert_no_error (error); g_assert (ret); expected_tlv_payload_size += 8; - ret = qmi_message_tlv_write_guint64 (self, QMI_ENDIAN_BIG, 0x1212121212121212, &error); + ret = qmi_message_tlv_write_guint64 (self, QMI_ENDIAN_BIG, 0x1212121212121212ULL, &error); g_assert_no_error (error); g_assert (ret); expected_tlv_payload_size += 8; - ret = qmi_message_tlv_write_gint64 (self, QMI_ENDIAN_BIG, 0 - 0x1212121212121212, &error); + ret = qmi_message_tlv_write_gint64 (self, QMI_ENDIAN_BIG, 0 - 0x1212121212121212LL, &error); g_assert_no_error (error); g_assert (ret); @@ -742,22 +742,22 @@ test_message_tlv_rw_64 (void) ret = qmi_message_tlv_read_guint64 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &uint64, &error); g_assert_no_error (error); g_assert (ret); - g_assert_cmpuint (uint64, ==, 0x1212121212121212); + g_assert_cmpuint (uint64, ==, 0x1212121212121212ULL); ret = qmi_message_tlv_read_gint64 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &int64, &error); g_assert_no_error (error); g_assert (ret); - g_assert_cmpuint (int64, ==, 0 - 0x1212121212121212); + g_assert_cmpuint (int64, ==, 0 - 0x1212121212121212LL); ret = qmi_message_tlv_read_guint64 (self, init_offset, &offset, QMI_ENDIAN_BIG, &uint64, &error); g_assert_no_error (error); g_assert (ret); - g_assert_cmpuint (uint64, ==, 0x1212121212121212); + g_assert_cmpuint (uint64, ==, 0x1212121212121212ULL); ret = qmi_message_tlv_read_gint64 (self, init_offset, &offset, QMI_ENDIAN_BIG, &int64, &error); g_assert_no_error (error); g_assert (ret); - g_assert_cmpuint (int64, ==, 0 - 0x1212121212121212); + g_assert_cmpuint (int64, ==, 0 - 0x1212121212121212LL); qmi_message_unref (self); } @@ -787,7 +787,7 @@ test_message_tlv_rw_sized (void) guint64 value; guint64 tmp; - value = 0x1212121212121212; + value = 0x1212121212121212ULL; tmp = 0xFF; for (i = 1; i < sized[sized_i]; i++) { tmp <<= 8; @@ -1034,12 +1034,12 @@ test_message_tlv_rw_mixed (void) g_assert (ret); expected_tlv_payload_size += 8; - ret = qmi_message_tlv_write_guint64 (self, QMI_ENDIAN_LITTLE, 0x1212121212121212, &error); + ret = qmi_message_tlv_write_guint64 (self, QMI_ENDIAN_LITTLE, 0x1212121212121212ULL, &error); g_assert_no_error (error); g_assert (ret); expected_tlv_payload_size += 8; - ret = qmi_message_tlv_write_gint64 (self, QMI_ENDIAN_LITTLE, 0 - 0x1212121212121212, &error); + ret = qmi_message_tlv_write_gint64 (self, QMI_ENDIAN_LITTLE, 0 - 0x1212121212121212LL, &error); g_assert_no_error (error); g_assert (ret); @@ -1103,12 +1103,12 @@ test_message_tlv_rw_mixed (void) ret = qmi_message_tlv_read_guint64 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &uint64, &error); g_assert_no_error (error); g_assert (ret); - g_assert_cmpuint (uint64, ==, 0x1212121212121212); + g_assert_cmpuint (uint64, ==, 0x1212121212121212ULL); ret = qmi_message_tlv_read_gint64 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &int64, &error); g_assert_no_error (error); g_assert (ret); - g_assert_cmpuint (int64, ==, 0 - 0x1212121212121212); + g_assert_cmpuint (int64, ==, 0 - 0x1212121212121212LL); qmi_message_unref (self); } @@ -1166,12 +1166,12 @@ test_message_tlv_write_overflow (void) g_assert (!ret); g_clear_error (&error); - ret = qmi_message_tlv_write_guint64 (self, QMI_ENDIAN_LITTLE, 0x1212121212121212, &error); + ret = qmi_message_tlv_write_guint64 (self, QMI_ENDIAN_LITTLE, 0x1212121212121212ULL, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); - ret = qmi_message_tlv_write_gint64 (self, QMI_ENDIAN_LITTLE, 0 - 0x1212121212121212, &error); + ret = qmi_message_tlv_write_gint64 (self, QMI_ENDIAN_LITTLE, 0 - 0x1212121212121212LL, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); |