Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

1.10.0: build fails with -Werror=format-security #72

@kloczek

Description

@kloczek
[tkloczko@pers-jacek liboping-1.10.0]$ make
Making all in src
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/liboping-1.10.0/src'
make  all-recursive
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/liboping-1.10.0/src'
Making all in mans
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/liboping-1.10.0/src/mans'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/liboping-1.10.0/src/mans'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/liboping-1.10.0/src'
/bin/sh ../libtool  --tag=CC   --mode=link /usr/bin/gcc -Wall -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none  -version-info 3:0:3 -Wl,--gc-sections -Wl,--as-needed -flto=auto -flto-partition=none -fuse-linker-plugin -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,--build-id=sha1 -o liboping.la -rpath /usr/lib64 liboping_la-liboping.lo
libtool: link: /usr/bin/gcc -shared  -fPIC -DPIC  .libs/liboping_la-liboping.o   -O2 -g -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mno-omit-leaf-frame-pointer -m64 -mtune=generic -flto=auto -flto-partition=none -Wl,--gc-sections -Wl,--as-needed -flto=auto -flto-partition=none -fuse-linker-plugin -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,--build-id=sha1   -Wl,-soname -Wl,liboping.so.0 -o .libs/liboping.so.0.3.0
libtool: link: (cd ".libs" && rm -f "liboping.so.0" && ln -s "liboping.so.0.3.0" "liboping.so.0")
libtool: link: (cd ".libs" && rm -f "liboping.so" && ln -s "liboping.so.0.3.0" "liboping.so")
libtool: link: ( cd ".libs" && rm -f "liboping.la" && ln -s "../liboping.la" "liboping.la" )
/bin/sh ../libtool  --tag=CC   --mode=link /usr/bin/gcc -Wall -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none  -Wl,--gc-sections -Wl,--as-needed -flto=auto -flto-partition=none -fuse-linker-plugin -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,--build-id=sha1 -o oping oping.o liboping.la -lm
libtool: link: /usr/bin/gcc -Wall -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -Wl,--gc-sections -Wl,--as-needed -flto=auto -flto-partition=none -fuse-linker-plugin -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,--build-id=sha1 -o .libs/oping oping.o  ./.libs/liboping.so -lm
/usr/bin/gcc -DHAVE_CONFIG_H -I.   -DUSE_NCURSES=1 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600  -Wall -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -c -o noping-oping.o `test -f 'oping.c' || echo './'`oping.c
oping.c: In function ‘update_graph_prettyping’:
oping.c:1136:25: error: format not a string literal and no format arguments [-Werror=format-security]
 1136 |                         mvwprintw (ctx->window, /* y = */ y_max, /* x = */ x + 2, symbol);
      |                         ^~~~~~~~~
oping.c: In function ‘update_graph_histogram’:
oping.c:1239:41: error: format not a string literal and no format arguments [-Werror=format-security]
 1239 |                                         hist_symbols_utf8[index]);
      |                                         ^~~~~~~~~~~~~~~~~
oping.c: In function ‘update_host_hook’:
oping.c:1583:38: warning: too many arguments for format [-Wformat-extra-args]
 1583 |                         HOST_PRINTF ("%zu bytes from %s (%s): icmp_seq=%u ttl=%i ",
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
oping.c:1560:45: note: in definition of macro ‘HOST_PRINTF’
 1560 | # define HOST_PRINTF(...) wprintw(main_win, __VA_ARGS__)
      |                                             ^~~~~~~~~~~
cc1: some warnings being treated as errors

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