mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Fix various sparse warnings
Mostly non-ANSI function declarations, using 0 as NULL and inline function prototypes. Also removed unused S_HTTP_100 network state enum type, which text message contained unknown escape sequence: '\?'.
This commit is contained in:
parent
2dd2e10a28
commit
5dffe2e8ac
@ -594,7 +594,7 @@ open_bookmark_folder(struct session *ses, unsigned char *foldername)
|
||||
|| !*bookmark->url)
|
||||
continue;
|
||||
|
||||
uri = get_translated_uri(bookmark->url, 0);
|
||||
uri = get_translated_uri(bookmark->url, NULL);
|
||||
if (!uri) continue;
|
||||
|
||||
/* Save the first bookmark for the current tab */
|
||||
|
@ -79,7 +79,7 @@ get_bookmark_uri(struct listbox_item *item)
|
||||
struct bookmark *bookmark = item->udata;
|
||||
|
||||
return bookmark->url && *bookmark->url
|
||||
? get_translated_uri(bookmark->url, 0) : NULL;
|
||||
? get_translated_uri(bookmark->url, NULL) : NULL;
|
||||
}
|
||||
|
||||
static struct listbox_item *
|
||||
|
@ -491,7 +491,7 @@ print_full_help(struct option *tree, unsigned char *path)
|
||||
}
|
||||
|
||||
static void
|
||||
print_short_help()
|
||||
print_short_help(void)
|
||||
{
|
||||
#define ALIGN_WIDTH 20
|
||||
struct option *option;
|
||||
|
@ -25,7 +25,7 @@ struct timer {
|
||||
static INIT_LIST_HEAD(timers);
|
||||
|
||||
int
|
||||
get_timers_count()
|
||||
get_timers_count(void)
|
||||
{
|
||||
return list_size(&timers);
|
||||
|
||||
|
@ -452,7 +452,19 @@ done_connection(struct connection *conn)
|
||||
check_queue_bugs();
|
||||
}
|
||||
|
||||
static inline void add_to_queue(struct connection *conn);
|
||||
static inline void
|
||||
add_to_queue(struct connection *conn)
|
||||
{
|
||||
struct connection *c;
|
||||
enum connection_priority priority = get_priority(conn);
|
||||
|
||||
foreach (c, connection_queue)
|
||||
if (get_priority(c) > priority)
|
||||
break;
|
||||
|
||||
add_at_pos(c->prev, conn);
|
||||
}
|
||||
|
||||
|
||||
/* Returns zero if no callback was done and the keepalive connection should be
|
||||
* deleted or non-zero if the keepalive connection should not be deleted. */
|
||||
@ -647,19 +659,6 @@ abort_all_keepalive_connections(void)
|
||||
}
|
||||
|
||||
|
||||
static inline void
|
||||
add_to_queue(struct connection *conn)
|
||||
{
|
||||
struct connection *c;
|
||||
enum connection_priority priority = get_priority(conn);
|
||||
|
||||
foreach (c, connection_queue)
|
||||
if (get_priority(c) > priority)
|
||||
break;
|
||||
|
||||
add_at_pos(c->prev, conn);
|
||||
}
|
||||
|
||||
static void
|
||||
sort_queue(void)
|
||||
{
|
||||
|
@ -68,7 +68,6 @@ struct s_msg_dsc {
|
||||
"programs is not supported.")},
|
||||
|
||||
{S_HTTP_ERROR, N_("Bad HTTP response")},
|
||||
{S_HTTP_100, N_("HTTP 100 (\?\?\?)")},
|
||||
{S_HTTP_204, N_("No content")},
|
||||
|
||||
{S_FILE_TYPE, N_("Unknown file type")},
|
||||
|
@ -71,8 +71,7 @@ enum connection_state {
|
||||
S_NO_FORCED_DNS = -100019,
|
||||
|
||||
S_HTTP_ERROR = -100100,
|
||||
S_HTTP_100 = -100101,
|
||||
S_HTTP_204 = -100102,
|
||||
S_HTTP_204 = -100101,
|
||||
|
||||
S_FILE_TYPE = -100200,
|
||||
S_FILE_ERROR = -100201,
|
||||
|
@ -684,7 +684,7 @@ get_output_handle(void)
|
||||
}
|
||||
|
||||
int
|
||||
get_ctl_handle()
|
||||
get_ctl_handle(void)
|
||||
{
|
||||
static int fd = -1;
|
||||
|
||||
|
@ -228,7 +228,7 @@ struct module http_protocol_module = struct_module(
|
||||
|
||||
|
||||
static void
|
||||
done_http()
|
||||
done_http(void)
|
||||
{
|
||||
mem_free_if(proxy_auth.realm);
|
||||
mem_free_if(proxy_auth.nonce);
|
||||
@ -241,7 +241,7 @@ done_http()
|
||||
}
|
||||
|
||||
static void
|
||||
init_accept_charset()
|
||||
init_accept_charset(void)
|
||||
{
|
||||
struct string ac;
|
||||
unsigned char *cs;
|
||||
|
@ -481,7 +481,7 @@ fastfind_index(struct fastfind_index *index, enum fastfind_flags flags)
|
||||
info->count++;
|
||||
}
|
||||
|
||||
if (!info->count) return 0;
|
||||
if (!info->count) return NULL;
|
||||
|
||||
init_idxtab(info);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user