x509-parser icon indicating copy to clipboard operation
x509-parser copied to clipboard

x509-parser.c: fix clang build

Open evdenis opened this issue 6 years ago • 0 comments

Clang fails to build the project. This patch fixes the problem.

$ clang --version
clang version 8.0.0 (tags/RELEASE_800/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/8/bin

$ CC=clang make
clang -Weverything -Werror -Wno-reserved-id-macro -Wno-unreachable-code-break -Wno-covered-switch-default -Wno-padded -pedantic -fno-builtin -std=c99 -D_FORTIFY_SOURCE=2 -fstack-protector-strong -O3 -fPIC -ffreestanding -c src/x509-parser.c -o build/x509-parser.o
src/x509-parser.c:3824:4: error: no previous prototype for function 'compute_decimal' [-Werror,-Wmissing-prototypes]
u8 compute_decimal(u8 d, u8 u)
   ^
src/x509-parser.c:3983:5: error: no previous prototype for function 'compute_year' [-Werror,-Wmissing-prototypes]
u16 compute_year(u8 d1, u8 d2, u8 d3, u8 d4)
    ^
2 errors generated.
make: *** [Makefile:19: build/x509-parser.o] Error 1

evdenis avatar Jun 23 '19 12:06 evdenis