From 723623d1e6c2921e9e0e90785d2a4620cfba4fcb Mon Sep 17 00:00:00 2001 From: Fabio Scotoni <34964387+fscoto@users.noreply.github.com> Date: Mon, 2 Mar 2020 08:36:52 +0100 Subject: [PATCH] extract_examples.sh: warning cleanup 1. Remove now-unused random_bytes(). 2. "warning: empty struct has size 0 in C, size 1 in C++ [-Wc++-compat]" "warning: empty struct is a GNU extension [-Wgnu-empty-struct]" clang -Weverything --- doc/extract_examples.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/doc/extract_examples.sh b/doc/extract_examples.sh index 78fb5f8..71ea9b3 100755 --- a/doc/extract_examples.sh +++ b/doc/extract_examples.sh @@ -58,16 +58,12 @@ cat << END #include "../src/monocypher.h" #include "../src/optional/monocypher-ed25519.h" -typedef struct SHA2_CTX { } SHA2_CTX; +typedef struct SHA2_CTX { void *x; } SHA2_CTX; void SHA512Init(SHA2_CTX*); void SHA512Update(SHA2_CTX*, const void*, size_t); void SHA512Final(uint8_t*, SHA2_CTX*); void arc4random_buf(void*, size_t); -static void random_bytes(uint8_t *buf, size_t len) -{ - arc4random_buf(buf, len); -} int main() { END -- 2.47.3