grobian / carbon-c-relay

Enhanced C implementation of Carbon relay, aggregator and rewriter
Apache License 2.0
380 stars 107 forks source link

GCC 8 compability with -Wall -Werror #393

Closed msaf1980 closed 4 years ago

msaf1980 commented 4 years ago

I got error when compile with gcc 8:

router.c: In function ‘router_test_intern’: router.c:81:21: error: ‘_aggregatorstub’ directive output truncated writing 17 bytes into a region of size 1 [-Werror=format-truncation=]

define STUB_AGGR "_aggregatorstub"

                 ^~~~~~~~~~~~~~~~~~~

router.c:3128:10: note: in expansion of macro ‘STUB_AGGR’ STUB_AGGR "%p__", ^~~~~

Also has a snprintf buffer length truncation (https://github.com/grobian/carbon-c-relay/pull/392)