-Wpedantic/scan-build stuff
This commit is contained in:
parent
3ecf06ba46
commit
4810b37b29
2
Makefile
2
Makefile
|
@ -1,7 +1,7 @@
|
||||||
SHELL = /bin/sh
|
SHELL = /bin/sh
|
||||||
CC = clang
|
CC = clang
|
||||||
# -Wunused-function is pretty annoying here, as everything is static
|
# -Wunused-function is pretty annoying here, as everything is static
|
||||||
CFLAGS = -std=c99 -Wall -Wextra -Wno-unused-function -ggdb
|
CFLAGS = -std=c99 -Wall -Wextra -Wpedantic -Wno-unused-function -ggdb
|
||||||
# -lpthread is only there for debugging (gdb & errno)
|
# -lpthread is only there for debugging (gdb & errno)
|
||||||
# -lrt is only for glibc < 2.17
|
# -lrt is only for glibc < 2.17
|
||||||
LDFLAGS = `pkg-config --libs libssl jansson` -lpthread -lrt -ldl -lcurses
|
LDFLAGS = `pkg-config --libs libssl jansson` -lpthread -lrt -ldl -lcurses
|
||||||
|
|
10
ponymap.c
10
ponymap.c
|
@ -1245,8 +1245,7 @@ node_print_tree_level (struct node *self, struct node_print_data *data)
|
||||||
struct str indent;
|
struct str indent;
|
||||||
str_init (&indent);
|
str_init (&indent);
|
||||||
|
|
||||||
struct node_print_level *iter = data->head;
|
for (struct node_print_level *iter = data->head; iter; iter = iter->next)
|
||||||
for (iter = data->head; iter; iter = iter->next)
|
|
||||||
{
|
{
|
||||||
bool started = iter->started;
|
bool started = iter->started;
|
||||||
iter->started = true;
|
iter->started = true;
|
||||||
|
@ -1257,9 +1256,10 @@ node_print_tree_level (struct node *self, struct node_print_data *data)
|
||||||
str_free (&indent);
|
str_free (&indent);
|
||||||
|
|
||||||
char *escaped = node_escape_text (self->text);
|
char *escaped = node_escape_text (self->text);
|
||||||
self->bold
|
if (self->bold)
|
||||||
? print_bold (stdout, escaped)
|
print_bold (stdout, escaped);
|
||||||
: fputs (escaped, stdout);
|
else
|
||||||
|
fputs (escaped, stdout);
|
||||||
fputc ('\n', stdout);
|
fputc ('\n', stdout);
|
||||||
free (escaped);
|
free (escaped);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue