Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x509-parser.c: fix clang build #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

evdenis
Copy link

@evdenis evdenis commented Jun 23, 2019

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

Clang fails to build the project because of the
"no previous prototype for function" warnings.
This patch fixes the problem.
@evdenis evdenis changed the title x509-parser.c: fix clang warnings x509-parser.c: fix clang build Jun 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant