]> granicus.if.org Git - check/commit
Fix declaration of extern int errno
authorMikko Johannes Koivunalho <mikko.koivunalho@inoviagroup.se>
Wed, 14 Aug 2019 08:56:25 +0000 (10:56 +0200)
committerMikko Johannes Koivunalho <mikko.koivunalho@iki.fi>
Wed, 28 Aug 2019 11:03:25 +0000 (13:03 +0200)
commite2401de234086d7107942034a78ec1b1a4ba322b
tree667871f91d91c272b2582c3a64aa0ae563e13377
parentf62bfea54cbb396fd5315aea12bbc6a2a06c8301
Fix declaration of extern int errno

if HAVE_VSNPRINTF is declared, <errno.h> is not included.
So we need to declare it ourselves.

Error (Travis SCAN_BUILD=YES):
libtool: compile:  /usr/local/clang-7.0.0/bin/../libexec/ccc-analyzer -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wno-variadic-macros -Wimport -Wfatal-errors -Wformat=2 -Winit-self -Wmissing-include-dirs -Wswitch-default -Wunknown-pragmas -MT snprintf.lo -MD -MP -MF .deps/snprintf.Tpo -c snprintf.c  -fPIC -DPIC -o .libs/snprintf.o
764snprintf.c:487:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
extern int errno;
^

Signed-off-by: Mikko Johannes Koivunalho <mikko.koivunalho@inoviagroup.se>
lib/snprintf.c