diff --git a/src/intl/charsets.c b/src/intl/charsets.c index 984934b78..f9d728927 100644 --- a/src/intl/charsets.c +++ b/src/intl/charsets.c @@ -1077,7 +1077,7 @@ struct entity_cache { static int hits_cmp(const void *v1, const void *v2) { - const struct entity_cache *a = v1, *b = v2; + const struct entity_cache *a = (const struct entity_cache *)v1, *b = (const struct entity_cache *)v2; if (a->hits == b->hits) return 0; if (a->hits > b->hits) return -1; @@ -1213,7 +1213,7 @@ skip: #endif } else { /* Text entity. */ struct string key = INIT_STRING((char *) str, strlen); - struct entity *element = bsearch((void *) &key, entities, + struct entity *element = (struct entity *)bsearch((void *) &key, entities, N_ENTITIES, sizeof(*element), compare_entities); @@ -1585,7 +1585,7 @@ get_cp_index(const char *name) #endif } - codepage = fastfind_search(&ff_charsets_index, name, strlen(name)); + codepage = (const struct codepage_desc *)fastfind_search(&ff_charsets_index, name, strlen(name)); if (codepage) { assert(codepages <= codepage && codepage < codepages + N_CODEPAGES); return (codepage - codepages) | syscp; diff --git a/src/main/event.c b/src/main/event.c index 487d1bab0..0f200969c 100644 --- a/src/main/event.c +++ b/src/main/event.c @@ -130,7 +130,7 @@ get_event_id(const char *name) namelen = strlen(name); item = get_hash_item(event_hash, name, namelen); if (item) { - struct event *event = item->value; + struct event *event = (struct event *)item->value; assertm(event != NULL, "Hash item with no value"); if_assert_failed return EVENT_NONE; diff --git a/src/main/select.c b/src/main/select.c index d893a7581..1b63e68bb 100644 --- a/src/main/select.c +++ b/src/main/select.c @@ -167,7 +167,7 @@ void check_bottom_halves(void) { while (!list_empty(bottom_halves)) { - struct bottom_half *bh = bottom_halves.prev; + struct bottom_half *bh = (struct bottom_half *)bottom_halves.prev; select_handler_T fn = bh->fn; void *data = bh->data; @@ -377,7 +377,7 @@ get_handler(int fd, enum select_handler_type tp) case SELECT_HANDLER_READ: return threads[fd].read_func; case SELECT_HANDLER_WRITE: return threads[fd].write_func; case SELECT_HANDLER_ERROR: return threads[fd].error_func; - case SELECT_HANDLER_DATA: return threads[fd].data; + case SELECT_HANDLER_DATA: return (select_handler_T)threads[fd].data; } INTERNAL("get_handler: bad type %d", tp); diff --git a/src/main/timer.c b/src/main/timer.c index 163df5ba3..e4a8a0644 100644 --- a/src/main/timer.c +++ b/src/main/timer.c @@ -100,7 +100,7 @@ check_timers(timeval_T *last_time) } while (!list_empty(timers)) { - timer = timers.next; + timer = (struct timer *)timers.next; if (timeval_is_positive(&timer->interval)) break;