1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

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.
This commit is contained in:
Andy Green 2018-11-03 09:24:20 +08:00
parent 45c788fecc
commit ae4b511d9a

View file

@ -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 */