mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[util] cast
This commit is contained in:
parent
0e2fdce434
commit
af29b2a93f
@ -115,7 +115,7 @@ decode_hex_color:
|
|||||||
if (!c_strlcasecmp(cs->name, -1, str, slen))
|
if (!c_strlcasecmp(cs->name, -1, str, slen))
|
||||||
break;
|
break;
|
||||||
#else
|
#else
|
||||||
cs = fastfind_search(&ff_colors_index, str, slen);
|
cs = (const struct color_spec *)fastfind_search(&ff_colors_index, str, slen);
|
||||||
#endif
|
#endif
|
||||||
if (cs && cs->name) {
|
if (cs && cs->name) {
|
||||||
*color = cs->rgb;
|
*color = cs->rgb;
|
||||||
|
@ -366,7 +366,7 @@ alloc_leafset(struct fastfind_info *info)
|
|||||||
static inline int
|
static inline int
|
||||||
char2idx(unsigned char c, struct fastfind_info *info)
|
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);
|
if (idx) return (idx - info->uniq_chars);
|
||||||
|
|
||||||
@ -602,7 +602,7 @@ fastfind_search(struct fastfind_index *index,
|
|||||||
assert(index);
|
assert(index);
|
||||||
if_assert_failed return NULL;
|
if_assert_failed return NULL;
|
||||||
|
|
||||||
info = index->handle;
|
info = (struct fastfind_info *)index->handle;
|
||||||
|
|
||||||
assertm(info != NULL, "FastFind index %s not initialized", index->comment);
|
assertm(info != NULL, "FastFind index %s not initialized", index->comment);
|
||||||
if_assert_failed return NULL;
|
if_assert_failed return NULL;
|
||||||
@ -643,7 +643,7 @@ fastfind_done(struct fastfind_index *index)
|
|||||||
assert(index);
|
assert(index);
|
||||||
if_assert_failed return;
|
if_assert_failed return;
|
||||||
|
|
||||||
info = index->handle;
|
info = (struct fastfind_info *)index->handle;
|
||||||
if (!info) return;
|
if (!info) return;
|
||||||
|
|
||||||
FF_DBG_dump_stats(info);
|
FF_DBG_dump_stats(info);
|
||||||
|
@ -277,7 +277,7 @@ safe_mkstemp(char *template_)
|
|||||||
int
|
int
|
||||||
compare_dir_entries(const void *v1, const void *v2)
|
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 (d1->name[0] == '.' && d1->name[1] == '.' && !d1->name[2]) return -1;
|
||||||
if (d2->name[0] == '.' && d2->name[1] == '.' && !d2->name[2]) return 1;
|
if (d2->name[0] == '.' && d2->name[1] == '.' && !d2->name[2]) return 1;
|
||||||
|
@ -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);
|
fmtstr(buffer, &currlen, maxlen, strvalue, flags, min, max);
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
strvalue = va_arg(args, void *);
|
strvalue = (char *)va_arg(args, void *);
|
||||||
fmtint(buffer, &currlen, maxlen, (long) strvalue, 16, min, max, flags);
|
fmtint(buffer, &currlen, maxlen, (long) strvalue, 16, min, max, flags);
|
||||||
break;
|
break;
|
||||||
case 'n':
|
case 'n':
|
||||||
|
@ -647,7 +647,7 @@ free_string_list(LIST_OF(struct string_list_item) *list)
|
|||||||
if_assert_failed return;
|
if_assert_failed return;
|
||||||
|
|
||||||
while (!list_empty(*list)) {
|
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);
|
del_from_list(item);
|
||||||
done_string(&item->string);
|
done_string(&item->string);
|
||||||
|
Loading…
Reference in New Issue
Block a user