Sparse says things like:
warning: non-ANSI function declaration of function 'calc_ttl'
Signed-off-by: John Keeping <john@keeping.me.uk>
+static int calc_ttl(void)
{
if (!ctx.repo)
return ctx.cfg.cache_root_ttl;
{
if (!ctx.repo)
return ctx.cfg.cache_root_ttl;
filter_write = new_write;
}
filter_write = new_write;
}
-static inline void unhook_write()
+static inline void unhook_write(void)
{
assert(filter_write != NULL);
assert(current_write_filter != NULL);
{
assert(filter_write != NULL);
assert(current_write_filter != NULL);
-void cgit_print_diff_ctrls()
+void cgit_print_diff_ctrls(void)
-static void print_tag_header()
+static void print_tag_header(void)
{
html("<tr class='nohover'><th class='left'>Tag</th>"
"<th class='left'>Download</th>"
{
html("<tr class='nohover'><th class='left'>Tag</th>"
"<th class='left'>Download</th>"
cgit_free_reflist_inner(&list);
}
cgit_free_reflist_inner(&list);
}
+void cgit_print_refs(void)
{
html("<table class='list nowrap'>");
{
html("<table class='list nowrap'>");
htmlf("'>%s</a></th>", title);
}
htmlf("'>%s</a></th>", title);
}
-static void print_header()
+static void print_header(void)
{
html("<tr class='nohover'>");
print_sort_header("Name", "name");
{
html("<tr class='nohover'>");
print_sort_header("Name", "name");
-void cgit_print_repolist()
+void cgit_print_repolist(void)
{
int i, columns = 3, hits = 0, header = 0;
char *last_section = NULL;
{
int i, columns = 3, hits = 0, header = 0;
char *last_section = NULL;
-void cgit_print_site_readme()
+void cgit_print_site_readme(void)
{
if (!ctx.cfg.root_readme)
return;
{
if (!ctx.cfg.root_readme)
return;
-const char *cgit_httpscheme()
+const char *cgit_httpscheme(void)
{
if (ctx.env.https && !strcmp(ctx.env.https, "on"))
return "https://";
{
if (ctx.env.https && !strcmp(ctx.env.https, "on"))
return "https://";
-const char *cgit_hosturl()
+const char *cgit_hosturl(void)
{
if (ctx.env.http_host)
return ctx.env.http_host;
{
if (ctx.env.http_host)
return ctx.env.http_host;
return fmtalloc("%s:%s", ctx.env.server_name, ctx.env.server_port);
}
return fmtalloc("%s:%s", ctx.env.server_name, ctx.env.server_port);
}
-const char *cgit_currenturl()
+const char *cgit_currenturl(void)
{
if (!ctx.qry.url)
return cgit_rooturl();
return ctx.qry.url;
}
{
if (!ctx.qry.url)
return cgit_rooturl();
return ctx.qry.url;
}
-const char *cgit_rooturl()
+const char *cgit_rooturl(void)
{
if (ctx.cfg.virtual_root)
return ctx.cfg.virtual_root;
{
if (ctx.cfg.virtual_root)
return ctx.cfg.virtual_root;
return ctx.cfg.script_name;
}
return ctx.cfg.script_name;
}
-const char *cgit_loginurl()
+const char *cgit_loginurl(void)
{
static const char *login_url = 0;
if (!login_url)
{
static const char *login_url = 0;
if (!login_url)
html_include(ctx.cfg.header);
}
html_include(ctx.cfg.header);
}
-void cgit_print_docend()
+void cgit_print_docend(void)
{
html("</div> <!-- class=content -->\n");
if (ctx.cfg.embedded) {
{
html("</div> <!-- class=content -->\n");
if (ctx.cfg.embedded) {
static struct deferred_lines *deferred_old, *deferred_old_last;
static struct deferred_lines *deferred_new, *deferred_new_last;
static struct deferred_lines *deferred_old, *deferred_old_last;
static struct deferred_lines *deferred_new, *deferred_new_last;
-static void create_or_reset_lcs_table()
+static void create_or_reset_lcs_table(void)
-static void print_deferred_old_lines()
+static void print_deferred_old_lines(void)
{
struct deferred_lines *iter_old, *tmp;
iter_old = deferred_old;
{
struct deferred_lines *iter_old, *tmp;
iter_old = deferred_old;
-static void print_deferred_new_lines()
+static void print_deferred_new_lines(void)
{
struct deferred_lines *iter_new, *tmp;
iter_new = deferred_new;
{
struct deferred_lines *iter_new, *tmp;
iter_new = deferred_new;
-static void print_deferred_changed_lines()
+static void print_deferred_changed_lines(void)
{
struct deferred_lines *iter_old, *iter_new, *tmp;
int n_old_lines = calc_deferred_lines(deferred_old);
{
struct deferred_lines *iter_old, *iter_new, *tmp;
int n_old_lines = calc_deferred_lines(deferred_old);
-void cgit_ssdiff_print_deferred_lines()
+void cgit_ssdiff_print_deferred_lines(void)
{
if (!deferred_old && !deferred_new)
return;
{
if (!deferred_old && !deferred_new)
return;
-void cgit_ssdiff_header_begin()
+void cgit_ssdiff_header_begin(void)
{
current_old_line = -1;
current_new_line = -1;
{
current_old_line = -1;
current_new_line = -1;
html("<tr><td class='head' colspan='4'>");
}
html("<tr><td class='head' colspan='4'>");
}
-void cgit_ssdiff_header_end()
+void cgit_ssdiff_header_end(void)
-void cgit_ssdiff_footer()
+void cgit_ssdiff_footer(void)
{
if (deferred_old || deferred_new)
cgit_ssdiff_print_deferred_lines();
{
if (deferred_old || deferred_new)
cgit_ssdiff_print_deferred_lines();
html("</a></td></tr>\n");
}
html("</a></td></tr>\n");
}
-void cgit_print_summary()
+void cgit_print_summary(void)
+static void ls_head(void)
{
html("<table summary='tree listing' class='list'>\n");
html("<tr class='nohover'>");
{
html("<table summary='tree listing' class='list'>\n");
html("<tr class='nohover'>");
+static void ls_tail(void)