1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-28 01:35:32 +00:00

[util] cast

This commit is contained in:
Witold Filipczyk 2022-01-26 18:04:36 +01:00
parent 0e2fdce434
commit af29b2a93f
5 changed files with 7 additions and 7 deletions

View File

@ -115,7 +115,7 @@ decode_hex_color:
if (!c_strlcasecmp(cs->name, -1, str, slen))
break;
#else
cs = fastfind_search(&ff_colors_index, str, slen);
cs = (const struct color_spec *)fastfind_search(&ff_colors_index, str, slen);
#endif
if (cs && cs->name) {
*color = cs->rgb;

View File

@ -366,7 +366,7 @@ alloc_leafset(struct fastfind_info *info)
static inline int
char2idx(unsigned char c, struct fastfind_info *info)
{
char *idx = memchr(info->uniq_chars, c, info->uniq_chars_count);
char *idx = (char *)memchr(info->uniq_chars, c, info->uniq_chars_count);
if (idx) return (idx - info->uniq_chars);
@ -602,7 +602,7 @@ fastfind_search(struct fastfind_index *index,
assert(index);
if_assert_failed return NULL;
info = index->handle;
info = (struct fastfind_info *)index->handle;
assertm(info != NULL, "FastFind index %s not initialized", index->comment);
if_assert_failed return NULL;
@ -643,7 +643,7 @@ fastfind_done(struct fastfind_index *index)
assert(index);
if_assert_failed return;
info = index->handle;
info = (struct fastfind_info *)index->handle;
if (!info) return;
FF_DBG_dump_stats(info);

View File

@ -277,7 +277,7 @@ safe_mkstemp(char *template_)
int
compare_dir_entries(const void *v1, const void *v2)
{
const struct directory_entry *d1 = v1, *d2 = v2;
const struct directory_entry *d1 = (const struct directory_entry *)v1, *d2 = (const struct directory_entry *)v2;
if (d1->name[0] == '.' && d1->name[1] == '.' && !d1->name[2]) return -1;
if (d2->name[0] == '.' && d2->name[1] == '.' && !d2->name[2]) return 1;

View File

@ -373,7 +373,7 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args_in)
fmtstr(buffer, &currlen, maxlen, strvalue, flags, min, max);
break;
case 'p':
strvalue = va_arg(args, void *);
strvalue = (char *)va_arg(args, void *);
fmtint(buffer, &currlen, maxlen, (long) strvalue, 16, min, max, flags);
break;
case 'n':

View File

@ -647,7 +647,7 @@ free_string_list(LIST_OF(struct string_list_item) *list)
if_assert_failed return;
while (!list_empty(*list)) {
struct string_list_item *item = list->next;
struct string_list_item *item = (struct string_list_item *)list->next;
del_from_list(item);
done_string(&item->string);