Skip to content

Cannot build with -Werror=format-security enabled #62

Open
@blalor

Description

@blalor

https://aur.archlinux.org/packages/liboping/#comment-837040

gcc -DHAVE_CONFIG_H -I.   -DUSE_NCURSES=1 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600    -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -c -o noping-oping.o `test -f 'oping.c' || echo './'`oping.c
oping.c: In function 'update_graph_prettyping':
oping.c:1124:25: error: format not a string literal and no format arguments [-Werror=format-security]
 1124 |                         mvwprintw (ctx->window, /* y = */ 3, /* x = */ x + 2, symbol);
      |                         ^~~~~~~~~
oping.c: In function 'update_graph_histogram':
oping.c:1222:41: error: format not a string literal and no format arguments [-Werror=format-security]
 1222 |                                         hist_symbols_utf8[index]);
      |                                         ^~~~~~~~~~~~~~~~~
oping.c: In function 'update_host_hook':
oping.c:1597:38: warning: too many arguments for format [-Wformat-extra-args]
 1597 |                         HOST_PRINTF ("%zu bytes from %s (%s): icmp_seq=%u ttl=%i ",
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
oping.c:1574:45: note: in definition of macro 'HOST_PRINTF'
 1574 | # define HOST_PRINTF(...) wprintw(main_win, __VA_ARGS__)
      |                                             ^~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [Makefile:584: noping-oping.o] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions