From ae4b511d9ac9830430ceb880bd36dabfbaf2fd12 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sat, 3 Nov 2018 09:24:20 +0800 Subject: [PATCH] trie: fix up gcc 8.2.1 armv7 off_t vs jg2_file_offset We really don't want to use off_t in the trie struct if we can avoid it since with alignment it adds 16 bytes per trie-entry. Cast around warnings. --- lib/misc/fts/trie.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/misc/fts/trie.c b/lib/misc/fts/trie.c index 6b633c5bb..c4a97cdcf 100644 --- a/lib/misc/fts/trie.c +++ b/lib/misc/fts/trie.c @@ -457,7 +457,7 @@ finalize_per_input(struct lws_fts *t) spill(0, 1); - assert(lseek(t->fd, 0, SEEK_END) == t->c); + assert(lseek(t->fd, 0, SEEK_END) == (off_t)t->c); if (t->lwsac_input_head) { lwsac_input_size = lwsac_total_alloc(t->lwsac_input_head); @@ -1066,7 +1066,7 @@ after: return 1; } - assert(lseek(t->fd, 0, SEEK_END) == t->c); + assert(lseek(t->fd, 0, SEEK_END) == (off_t)t->c); if (lseek(t->fd, t->c, SEEK_SET) < 0) { lwsl_err("%s: end seek failed\n", __func__); @@ -1330,7 +1330,7 @@ lws_fts_serialize(struct lws_fts *t) spill(0, 1); - assert(lseek(t->fd, 0, SEEK_END) == t->c); + assert(lseek(t->fd, 0, SEEK_END) == (off_t)t->c); /* drop the correct root trie offset + file length into the header */