Skip to content

Commit

Permalink
fix some -Wstrict-prototypes warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
N-R-K committed Apr 29, 2022
1 parent c515ea8 commit d9284b1
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 37 deletions.
6 changes: 3 additions & 3 deletions file.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ check_command(char *cmd, int auxbin_p)
}

char *
acceptableEncoding()
acceptableEncoding(void)
{
static Str encodings = NULL;
struct compression_decoder *d;
Expand Down Expand Up @@ -5547,7 +5547,7 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env)
static TextLineListItem *_tl_lp2;

static Str
textlist_feed()
textlist_feed(void)
{
TextLine *p;
if (_tl_lp2 != NULL) {
Expand Down Expand Up @@ -6330,7 +6330,7 @@ HTMLlineproc2(Buffer *buf, TextLineList *tl)
static InputStream _file_lp2;

static Str
file_feed()
file_feed(void)
{
Str s;
s = StrISgets(_file_lp2);
Expand Down
2 changes: 1 addition & 1 deletion history.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ saveHistory(Hist *hist, size_t size)
#endif /* USE_HISTORY */

Hist *
newHist()
newHist(void)
{
Hist *hist;

Expand Down
2 changes: 1 addition & 1 deletion history.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ typedef struct {
Hash_sv *hash;
} Hist;

extern Hist *newHist();
extern Hist *newHist(void);
extern Hist *copyHist(Hist *hist);
extern HistItem *unshiftHist(Hist *hist, char *ptr);
extern HistItem *pushHist(Hist *hist, char *ptr);
Expand Down
10 changes: 5 additions & 5 deletions indep.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,32 +840,32 @@ w3m_dir(const char *name, char *dft)
}

char *
w3m_auxbin_dir()
w3m_auxbin_dir(void)
{
return w3m_dir("W3M_AUXBIN_DIR", AUXBIN_DIR);
}

char *
w3m_lib_dir()
w3m_lib_dir(void)
{
/* FIXME: use W3M_CGIBIN_DIR? */
return w3m_dir("W3M_LIB_DIR", CGIBIN_DIR);
}

char *
w3m_etc_dir()
w3m_etc_dir(void)
{
return w3m_dir("W3M_ETC_DIR", ETC_DIR);
}

char *
w3m_conf_dir()
w3m_conf_dir(void)
{
return w3m_dir("W3M_CONF_DIR", CONF_DIR);
}

char *
w3m_help_dir()
w3m_help_dir(void)
{
return w3m_dir("W3M_HELP_DIR", HELP_DIR);
}
Expand Down
10 changes: 5 additions & 5 deletions indep.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ extern void growbuf_reserve(struct growbuf *gb, int leastarea);
extern void growbuf_append(struct growbuf *gb, const unsigned char *src, int len);
#define GROWBUF_ADD_CHAR(gb,ch) ((((gb)->length>=(gb)->area_size)?growbuf_reserve(gb,(gb)->length+1):(void)0),(void)((gb)->ptr[(gb)->length++] = (ch)))

extern char *w3m_auxbin_dir();
extern char *w3m_lib_dir();
extern char *w3m_etc_dir();
extern char *w3m_conf_dir();
extern char *w3m_help_dir();
extern char *w3m_auxbin_dir(void);
extern char *w3m_lib_dir(void);
extern char *w3m_etc_dir(void);
extern char *w3m_conf_dir(void);
extern char *w3m_help_dir(void);

#define NewWithoutGC(type) ((type*)xmalloc(sizeof(type)))
#define NewWithoutGC_N(type,n) ((type*)xmalloc((n)*sizeof(type)))
Expand Down
4 changes: 2 additions & 2 deletions mailcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ loadMailcap(char *filename)
}

void
initMailcap()
initMailcap(void)
{
TextListItem *tl;
int i;
Expand All @@ -238,7 +238,7 @@ initMailcap()
}

char *
acceptableMimeTypes()
acceptableMimeTypes(void)
{
static Str types = NULL;
TextList *l;
Expand Down
14 changes: 7 additions & 7 deletions proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ extern int currentLn(Buffer *buf);
extern void tmpClearBuffer(Buffer *buf);
extern char *filename_extension(char *patch, int is_url);
#ifdef USE_EXTERNAL_URI_LOADER
extern void initURIMethods();
extern void initURIMethods(void);
extern Str searchURIMethods(ParsedURL *pu);
extern void chkExternalURIBuffer(Buffer *buf);
#endif
Expand All @@ -188,7 +188,7 @@ extern char *url_decode0(const char *url);
#define url_decode2(url, buf) url_decode0(url)
#endif /* !defined(USE_M17N) */
extern void examineFile(char *path, URLFile *uf);
extern char *acceptableEncoding();
extern char *acceptableEncoding(void);
extern int dir_exist(char *path);
extern int is_html_type(char *type);
#ifdef USE_M17N
Expand Down Expand Up @@ -533,10 +533,10 @@ extern char getch(void);
extern void bell(void);
extern int sleep_till_anykey(int sec, int purge);
#ifdef USE_IMAGE
extern void touch_cursor();
extern void touch_cursor(void);
#endif
extern void initMimeTypes();
extern void free_ssl_ctx();
extern void initMimeTypes(void);
extern void free_ssl_ctx(void);
extern ParsedURL *baseURL(Buffer *buf);
extern int openSocket(char *hostname, char *remoteport_name,
unsigned short remoteport_num);
Expand All @@ -555,8 +555,8 @@ extern URLFile openURL(char *url, ParsedURL *pu, ParsedURL *current,
HRequest *hr, unsigned char *status);
extern int mailcapMatch(struct mailcap *mcap, char *type);
extern struct mailcap *searchMailcap(struct mailcap *table, char *type);
extern void initMailcap();
extern char *acceptableMimeTypes();
extern void initMailcap(void);
extern char *acceptableMimeTypes(void);
extern struct mailcap *searchExtViewer(char *type);
extern Str unquote_mailcap(char *qstr, char *type, char *name, char *attr,
int *mc_stat);
Expand Down
8 changes: 4 additions & 4 deletions rc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1180,8 +1180,8 @@ interpret_rc(FILE * f)
}
}

void
parse_proxy()
static void
parse_proxy(void)
{
if (non_null(HTTP_proxy))
parseURL(HTTP_proxy, &HTTP_proxy_parsed, NULL);
Expand All @@ -1200,8 +1200,8 @@ parse_proxy()
}

#ifdef USE_COOKIE
void
parse_cookie()
static void
parse_cookie(void)
{
if (non_null(cookie_reject_domains))
Cookie_reject_domains = make_domain_list(cookie_reject_domains);
Expand Down
10 changes: 5 additions & 5 deletions terms.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ static int xpix, ypix, nbs, obs = 0;

static int is_xterm = 0;

void mouse_init(), mouse_end();
void mouse_init(void), mouse_end(void);
int mouseActive = 0;
#endif /* USE_MOUSE */

Expand Down Expand Up @@ -263,7 +263,7 @@ check_cygwin_console(void)
char *getenv(const char *);
MySignalHandler reset_exit(SIGNAL_ARG), reset_error_exit(SIGNAL_ARG), error_dump(SIGNAL_ARG);
void setlinescols(void);
void flush_tty();
void flush_tty(void);

#ifndef SIGIOT
#define SIGIOT SIGABRT
Expand Down Expand Up @@ -452,7 +452,7 @@ extern int tgetflag(char *);
extern char *tgetstr(char *, char **);
extern char *tgoto(char *, int, int);
extern int tputs(char *, int, int (*)(char));
void clear(), wrap(), touch_line(), touch_column(int);
void clear(void), wrap(void), touch_line(void), touch_column(int);
#if 0
void need_clrtoeol(void);
#endif
Expand Down Expand Up @@ -2654,15 +2654,15 @@ mouse_inactive()
#endif /* USE_MOUSE */

void
flush_tty()
flush_tty(void)
{
if (ttyf)
fflush(ttyf);
}

#ifdef USE_IMAGE
void
touch_cursor()
touch_cursor(void)
{
#ifdef USE_M17N
int i;
Expand Down
8 changes: 4 additions & 4 deletions url.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ loadMimeTypes(char *filename)
}

void
initMimeTypes()
initMimeTypes(void)
{
int i;
TextListItem *tl;
Expand Down Expand Up @@ -251,7 +251,7 @@ KeyAbort(SIGNAL_ARG)
SSL_CTX *ssl_ctx = NULL;

void
free_ssl_ctx()
free_ssl_ctx(void)
{
if (ssl_ctx != NULL)
SSL_CTX_free(ssl_ctx);
Expand All @@ -262,7 +262,7 @@ free_ssl_ctx()
#if SSLEAY_VERSION_NUMBER >= 0x00905100
#include <openssl/rand.h>
static void
init_PRNG()
init_PRNG(void)
{
char buffer[256];
const char *file;
Expand Down Expand Up @@ -2305,7 +2305,7 @@ loadURIMethods(char *filename)
}

void
initURIMethods()
initURIMethods(void)
{
TextList *methodmap_list = NULL;
TextListItem *tl;
Expand Down

0 comments on commit d9284b1

Please sign in to comment.