about summary refs log tree commit diff stats
path: root/ui-shared.c
diff options
context:
space:
mode:
authorJohn Keeping2015-03-08 16:32:16 +0000
committerJason A. Donenfeld2015-03-09 17:38:30 +0100
commite3d3fffdd447cdb4551549faae65bae5353a2cab (patch)
tree43ab1eaeeabf9269d0eebb64e64e957183f41b4d /ui-shared.c
parentMakefile: add a target to run CGit through sparse (diff)
downloadcgit-e3d3fffdd447cdb4551549faae65bae5353a2cab.tar.gz
cgit-e3d3fffdd447cdb4551549faae65bae5353a2cab.zip
Avoid non-ANSI function declarations
Sparse says things like:

	warning: non-ANSI function declaration of function 'calc_ttl'

Signed-off-by: John Keeping <john@keeping.me.uk>
Diffstat (limited to 'ui-shared.c')
-rw-r--r--ui-shared.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ui-shared.c b/ui-shared.c index ff03cb2..6d3cfa9 100644 --- a/ui-shared.c +++ b/ui-shared.c
@@ -46,7 +46,7 @@ void cgit_vprint_error(const char *fmt, va_list ap)
46 html("</div>\n"); 46 html("</div>\n");
47} 47}
48 48
49const char *cgit_httpscheme() 49const char *cgit_httpscheme(void)
50{ 50{
51 if (ctx.env.https && !strcmp(ctx.env.https, "on")) 51 if (ctx.env.https && !strcmp(ctx.env.https, "on"))
52 return "https://"; 52 return "https://";
@@ -54,7 +54,7 @@ const char *cgit_httpscheme()
54 return "http://"; 54 return "http://";
55} 55}
56 56
57const char *cgit_hosturl() 57const char *cgit_hosturl(void)
58{ 58{
59 if (ctx.env.http_host) 59 if (ctx.env.http_host)
60 return ctx.env.http_host; 60 return ctx.env.http_host;
@@ -65,14 +65,14 @@ const char *cgit_hosturl()
65 return fmtalloc("%s:%s", ctx.env.server_name, ctx.env.server_port); 65 return fmtalloc("%s:%s", ctx.env.server_name, ctx.env.server_port);
66} 66}
67 67
68const char *cgit_currenturl() 68const char *cgit_currenturl(void)
69{ 69{
70 if (!ctx.qry.url) 70 if (!ctx.qry.url)
71 return cgit_rooturl(); 71 return cgit_rooturl();
72 return ctx.qry.url; 72 return ctx.qry.url;
73} 73}
74 74
75const char *cgit_rooturl() 75const char *cgit_rooturl(void)
76{ 76{
77 if (ctx.cfg.virtual_root) 77 if (ctx.cfg.virtual_root)
78 return ctx.cfg.virtual_root; 78 return ctx.cfg.virtual_root;
@@ -80,7 +80,7 @@ const char *cgit_rooturl()
80 return ctx.cfg.script_name; 80 return ctx.cfg.script_name;
81} 81}
82 82
83const char *cgit_loginurl() 83const char *cgit_loginurl(void)
84{ 84{
85 static const char *login_url = 0; 85 static const char *login_url = 0;
86 if (!login_url) 86 if (!login_url)
@@ -735,7 +735,7 @@ void cgit_print_docstart(void)
735 html_include(ctx.cfg.header); 735 html_include(ctx.cfg.header);
736} 736}
737 737
738void cgit_print_docend() 738void cgit_print_docend(void)
739{ 739{
740 html("</div> <!-- class=content -->\n"); 740 html("</div> <!-- class=content -->\n");
741 if (ctx.cfg.embedded) { 741 if (ctx.cfg.embedded) {