mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
[mem_align_alloc] cast
This commit is contained in:
parent
028e877105
commit
23f1a7cdce
@ -1392,7 +1392,7 @@ add_to_menu(struct menu_item **mi, char *text, char *rtext,
|
|||||||
{
|
{
|
||||||
int n = count_items(*mi);
|
int n = count_items(*mi);
|
||||||
/* XXX: Don't clear the last and special item. */
|
/* XXX: Don't clear the last and special item. */
|
||||||
struct menu_item *item = realloc_menu_items(mi, n + 1);
|
struct menu_item *item = (struct menu_item *)realloc_menu_items(mi, n + 1);
|
||||||
|
|
||||||
if (!item) return;
|
if (!item) return;
|
||||||
|
|
||||||
|
@ -23,14 +23,14 @@
|
|||||||
static inline struct dom_stack_state *
|
static inline struct dom_stack_state *
|
||||||
realloc_dom_stack_states(struct dom_stack_state **states, size_t size)
|
realloc_dom_stack_states(struct dom_stack_state **states, size_t size)
|
||||||
{
|
{
|
||||||
return mem_align_alloc(states, size, size + 1,
|
return (struct dom_stack_state *)mem_align_alloc(states, size, size + 1,
|
||||||
DOM_STACK_STATE_GRANULARITY);
|
DOM_STACK_STATE_GRANULARITY);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct dom_stack_state *
|
static inline struct dom_stack_state *
|
||||||
realloc_dom_stack_context(struct dom_stack_context ***contexts, size_t size)
|
realloc_dom_stack_context(struct dom_stack_context ***contexts, size_t size)
|
||||||
{
|
{
|
||||||
return mem_align_alloc(contexts, size, size + 1,
|
return (struct dom_stack_state *)mem_align_alloc(contexts, size, size + 1,
|
||||||
DOM_STACK_STATE_GRANULARITY);
|
DOM_STACK_STATE_GRANULARITY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,12 +38,12 @@ static inline char *
|
|||||||
realloc_dom_stack_state_objects(struct dom_stack_context *context, size_t depth)
|
realloc_dom_stack_state_objects(struct dom_stack_context *context, size_t depth)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_MEMLEAK
|
#ifdef DEBUG_MEMLEAK
|
||||||
return mem_align_alloc__(__FILE__, __LINE__, (void **) &context->state_objects,
|
return (char *)mem_align_alloc__(__FILE__, __LINE__, (void **) &context->state_objects,
|
||||||
depth, depth + 1,
|
depth, depth + 1,
|
||||||
context->info->object_size,
|
context->info->object_size,
|
||||||
DOM_STACK_STATE_GRANULARITY);
|
DOM_STACK_STATE_GRANULARITY);
|
||||||
#else
|
#else
|
||||||
return mem_align_alloc__((void **) &context->state_objects,
|
return (char *)mem_align_alloc__((void **) &context->state_objects,
|
||||||
depth, depth + 1,
|
depth, depth + 1,
|
||||||
context->info->object_size,
|
context->info->object_size,
|
||||||
DOM_STACK_STATE_GRANULARITY);
|
DOM_STACK_STATE_GRANULARITY);
|
||||||
|
@ -256,7 +256,7 @@ find_form_state(struct document_view *doc_view, struct el_form_control *fc)
|
|||||||
const struct form_state *const old_form_info = vs->form_info;
|
const struct form_state *const old_form_info = vs->form_info;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
fs = mem_align_alloc(&vs->form_info, vs->form_info_len, nn, 0);
|
fs = (struct form_state *)mem_align_alloc(&vs->form_info, vs->form_info_len, nn, 0);
|
||||||
if (!fs) return NULL;
|
if (!fs) return NULL;
|
||||||
vs->form_info = fs;
|
vs->form_info = fs;
|
||||||
vs->form_info_len = nn;
|
vs->form_info_len = nn;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user