mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-27 09:06:43 +08:00
gj_common: Use cppcheck to catch potential errors
This commit is contained in:
@ -4,3 +4,4 @@ RUN apk update
|
|||||||
RUN apk add clang libgit2-dev
|
RUN apk add clang libgit2-dev
|
||||||
RUN apk add bash make libc-dev g++ vim gdb
|
RUN apk add bash make libc-dev g++ vim gdb
|
||||||
RUN apk add musl-dbg git
|
RUN apk add musl-dbg git
|
||||||
|
RUN apk add curl cppcheck
|
||||||
|
@ -8,3 +8,6 @@ build-env: Dockerfile
|
|||||||
|
|
||||||
shell:
|
shell:
|
||||||
docker run --rm -it -v `pwd`:/code -w /code gitjournal_lib bash
|
docker run --rm -it -v `pwd`:/code -w /code gitjournal_lib bash
|
||||||
|
|
||||||
|
cppcheck:
|
||||||
|
cppcheck --enable=all --suppress=unusedFunction common.c gitjournal.c keygen.c
|
||||||
|
@ -79,7 +79,7 @@ int write_rsa_public_key(RSA *pRsa, const char *file_path, const char *comment)
|
|||||||
memcpy(pEncoding, pSshHeader, 11);
|
memcpy(pEncoding, pSshHeader, 11);
|
||||||
|
|
||||||
index = SshEncodeBuffer(&pEncoding[11], eLen, eBytes);
|
index = SshEncodeBuffer(&pEncoding[11], eLen, eBytes);
|
||||||
index = SshEncodeBuffer(&pEncoding[11 + index], nLen, nBytes);
|
SshEncodeBuffer(&pEncoding[11 + index], nLen, nBytes);
|
||||||
|
|
||||||
b64 = BIO_new(BIO_f_base64());
|
b64 = BIO_new(BIO_f_base64());
|
||||||
BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL);
|
BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL);
|
||||||
|
Reference in New Issue
Block a user