mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-17 00:06:59 +00:00
all: fix compiler warninings
Use compiler warnings from coreutils to check nothing complains, and fix everything that did. CFLAGS='-Wall -W -Wformat-y2k -Wformat-security -Winit-self -Wmissing-include-dirs -Wunused -Wunknown-pragmas -Wstrict-aliasing -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wmissing-declarations -Wmissing-noreturn -Wpacked -Winvalid-pch -Wvolatile-register-var -Wdisabled-optimization -Woverlength-strings -Wbuiltin-macro-redefined -Wmudflap -Wpacked-bitfield-compat -Wsync-nand -Wattributes -Wcoverage-mismatch -Wabi -Wcpp -Wdeprecated -Wdeprecated-declarations -Wdiv-by-zero -Wendif-labels -Wextra -Wformat-contains-nul -Wformat-extra-args -Wformat-zero-length -Wformat=2 -Wmultichar -Wnormalized=nfc -Woverflow -Wpointer-to-int-cast -Wpragmas -Wsuggest-attribute=noreturn -Wtrampolines -Wno-sign-compare -Wno-unused-parameter -Wsuggest-attribute=noreturn -Wno-format-nonliteral -Wno-logical-op -fdiagnostics-show-option -funit-at-a-time' Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
37563d8d59
commit
b3e02ce0ba
6 changed files with 22 additions and 19 deletions
22
src/output.c
22
src/output.c
|
|
@ -314,7 +314,7 @@ int output_xml(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void html_header(FILE *restrict f)
|
||||
static void html_header(FILE *restrict f)
|
||||
{
|
||||
char outstr[200];
|
||||
struct tm *tmp;
|
||||
|
|
@ -388,7 +388,7 @@ void html_header(FILE *restrict f)
|
|||
fprintf(f, "<a name=\"ranges\">The lease file mtime: %s</a>", outstr);
|
||||
}
|
||||
|
||||
void html_footer(FILE *restrict f)
|
||||
static void html_footer(FILE *restrict f)
|
||||
{
|
||||
fprintf(f, "<p><br></p>\n");
|
||||
fprintf(f, "<hr>\n");
|
||||
|
|
@ -404,44 +404,46 @@ void html_footer(FILE *restrict f)
|
|||
fprintf(f, "</html>\n");
|
||||
}
|
||||
|
||||
void newrow(FILE *restrict f)
|
||||
static void newrow(FILE *restrict f)
|
||||
{
|
||||
fprintf(f, "<tr>\n");
|
||||
}
|
||||
|
||||
void endrow(FILE *restrict f)
|
||||
static void endrow(FILE *restrict f)
|
||||
{
|
||||
fprintf(f, "</tr>\n\n");
|
||||
}
|
||||
|
||||
void output_line(FILE *restrict f, char *restrict type, char *restrict class, char *restrict text)
|
||||
static void output_line(FILE *restrict f, char const *restrict type,
|
||||
char const *restrict class, char const *restrict text)
|
||||
{
|
||||
fprintf(f, " <%s class=%s>%s</%s>\n", type, class, text, type);
|
||||
}
|
||||
|
||||
void output_long(FILE *restrict f, char *restrict type, unsigned long unlong)
|
||||
static void output_long(FILE *restrict f, char const *restrict type,
|
||||
unsigned long unlong)
|
||||
{
|
||||
fprintf(f, " <%s class=ralign>%lu</%s>\n", type, unlong, type);
|
||||
}
|
||||
|
||||
void output_float(FILE * f, char *restrict type, float fl)
|
||||
static void output_float(FILE * f, char const *restrict type, float fl)
|
||||
{
|
||||
fprintf(f, " <%s class=ralign>%.3f</%s>\n", type, fl, type);
|
||||
}
|
||||
|
||||
void table_start(FILE *restrict f)
|
||||
static void table_start(FILE *restrict f)
|
||||
{
|
||||
fprintf(f, "<table width=\"75%%\" ");
|
||||
fprintf(f, "class=\"%s\" ", PACKAGE_NAME);
|
||||
fprintf(f, "summary=\"ISC dhcpd pool usage report\">\n");
|
||||
}
|
||||
|
||||
void table_end(FILE *restrict f)
|
||||
static void table_end(FILE *restrict f)
|
||||
{
|
||||
fprintf(f, "</table>\n");
|
||||
}
|
||||
|
||||
void newsection(FILE *restrict f, char *restrict title)
|
||||
static void newsection(FILE *restrict f, char const *restrict title)
|
||||
{
|
||||
newrow(f);
|
||||
output_line(f, "td", "calign", " ");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue