X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/halibut/blobdiff_plain/9ae3b6f0ff3626d7303488b9020eeeea811a4426..c885c2ffbb3aea5c255d3b2e767d4450b2bebcc6:/winhelp.c diff --git a/winhelp.c b/winhelp.c index ec36031..7db4801 100644 --- a/winhelp.c +++ b/winhelp.c @@ -418,7 +418,7 @@ static unsigned long context_hash(char *context) if (val > 0 && hash > (0xFFFFFFFFUL - val)) { hash -= (0xFFFFFFFFUL - val) + 1; - } else if (val < 0 && hash < -val) { + } else if (val < 0 && hash < (unsigned long)-val) { hash += (0xFFFFFFFFUL + val) + 1; } else hash += val; @@ -580,7 +580,7 @@ void whlp_browse_link(WHLP h, WHLP_TOPIC before, WHLP_TOPIC after) static void whlp_linkdata(WHLP h, int which, int c) { int *len = (which == 1 ? &h->link->len1 : &h->link->len2); - char *data = (which == 1 ? h->linkdata1 : h->linkdata2); + unsigned char *data = (which == 1 ? h->linkdata1 : h->linkdata2); assert(*len < TOPIC_BLKSIZE); data[(*len)++] = c; } @@ -1275,7 +1275,7 @@ static void whlp_make_btree(struct file *f, int flags, int pagesize, int npages = 0, pagessize = 0; int npages_this_level, nentries, nlevels; int total_leaf_entries; - char btdata[MAX_PAGE_SIZE]; + unsigned char btdata[MAX_PAGE_SIZE]; int btlen; int page_start, fixups_offset, unused_bytes; void *element;