From 2e873c8767056e75e8e44d878caf5673df06f423 Mon Sep 17 00:00:00 2001 From: Scott Prager Date: Tue, 8 Jul 2014 15:53:06 -0400 Subject: sha256.c: Enable -Wconvert and clint. * Add sha256.c/h to clint-files.txt. * Add sha256.c to CONV_SRCS in src/nvim/CMakeLists.txt. * Use size_t for lengths and const for read-only parameters. * Use restrict keyword. * Refine #includes. --- src/nvim/sha256.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/nvim/sha256.h') diff --git a/src/nvim/sha256.h b/src/nvim/sha256.h index c8ffa94cc4..1ab283027a 100644 --- a/src/nvim/sha256.h +++ b/src/nvim/sha256.h @@ -1,6 +1,10 @@ #ifndef NVIM_SHA256_H #define NVIM_SHA256_H +#include // for uint32_t + +#include "nvim/types.h" // for char_u + typedef struct { uint32_t total[2]; uint32_t state[8]; -- cgit From 338dd10f332be8c094ed9bb0d38454eb85eecf47 Mon Sep 17 00:00:00 2001 From: Scott Prager Date: Sat, 26 Jul 2014 02:32:22 -0400 Subject: sha: define SHA256_BUFFER_SIZE and SUM_SIZE. --- src/nvim/sha256.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/nvim/sha256.h') diff --git a/src/nvim/sha256.h b/src/nvim/sha256.h index 1ab283027a..a118826542 100644 --- a/src/nvim/sha256.h +++ b/src/nvim/sha256.h @@ -5,10 +5,13 @@ #include "nvim/types.h" // for char_u +#define SHA256_BUFFER_SIZE 64 +#define SHA256_SUM_SIZE 32 + typedef struct { uint32_t total[2]; uint32_t state[8]; - char_u buffer[64]; + char_u buffer[SHA256_BUFFER_SIZE]; } context_sha256_T; #ifdef INCLUDE_GENERATED_DECLARATIONS -- cgit