[Spice-commits] 2 commits - common/quic.c meson.build
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jan 17 08:46:39 UTC 2019
common/quic.c | 2 +-
meson.build | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 0a753b93b50b548a2ac04023c96a7cda83f204bf
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date: Thu Jan 17 02:52:47 2019 +0400
meson: fix building for big-endian host
autofoo build-sys defines WORDS_BIGENDIAN, and spice-common code uses it.
Later, I think it would make sense to switch to G_BIG_ENDIAN instead.
Fixes:
https://gitlab.freedesktop.org/spice/spice-common/issues/2
Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
Acked-by: Victor Toso <victortoso at redhat.com>
diff --git a/meson.build b/meson.build
index 049409b..8579680 100644
--- a/meson.build
+++ b/meson.build
@@ -33,6 +33,9 @@ spice_common_config_data = configuration_data()
if get_option('extra-checks')
spice_common_config_data.set('ENABLE_EXTRA_CHECKS', '1')
endif
+if host_machine.endian() == 'big'
+ spice_common_config_data.set('WORDS_BIGENDIAN', '1')
+endif
spice_common_generate_code = get_option('generate-code')
spice_common_generate_client_code = spice_common_generate_code == 'all' or spice_common_generate_code == 'client'
commit 6c09f943ce7b7531640fc604574b62536bfe4053
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date: Thu Jan 17 01:28:47 2019 +0400
quic: fix sign-compare warning
../subprojects/spice-common/common/quic.c: In function 'fill_model_structures':
../subprojects/spice-common/common/quic.c:695:55: error: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Werror=sign-compare]
spice_assert(free_counter - family_stat->counters == nbuckets * ncounters);
^~
Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
Acked-by: Frediano Ziglio <figlio at redhat.com>
diff --git a/common/quic.c b/common/quic.c
index c28974e..1760274 100644
--- a/common/quic.c
+++ b/common/quic.c
@@ -692,7 +692,7 @@ static void fill_model_structures(SPICE_GNUC_UNUSED Encoder *encoder, FamilyStat
bnumber++;
} while (bend < levels - 1);
- spice_assert(free_counter - family_stat->counters == nbuckets * ncounters);
+ spice_assert(free_counter - family_stat->counters == (ptrdiff_t)(nbuckets * ncounters));
}
static void find_model_params(Encoder *encoder,
More information about the Spice-commits
mailing list