From 4be6c6cf0ddf5e31d4103cb5df06651ba6f4897b Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 11 Feb 2023 11:05:57 +0100 Subject: refactor: replace char_u with char (#21901) refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459 --- src/nvim/sha256.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/sha256.c') diff --git a/src/nvim/sha256.c b/src/nvim/sha256.c index db647f3ecb..f0a9aecdcc 100644 --- a/src/nvim/sha256.c +++ b/src/nvim/sha256.c @@ -201,14 +201,14 @@ void sha256_update(context_sha256_T *ctx, const uint8_t *input, size_t length) memcpy(ctx->buffer + left, input, fill); sha256_process(ctx, ctx->buffer); length -= fill; - input += fill; + input += fill; left = 0; } while (length >= SHA256_BUFFER_SIZE) { sha256_process(ctx, input); length -= SHA256_BUFFER_SIZE; - input += SHA256_BUFFER_SIZE; + input += SHA256_BUFFER_SIZE; } if (length) { -- cgit From 5f03a1eaabfc8de2b3a9c666fcd604763f41e152 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Fri, 20 Oct 2023 15:10:33 +0200 Subject: build(lint): remove unnecessary clint.py rules Uncrustify is the source of truth where possible. Remove any redundant checks from clint.py. --- src/nvim/sha256.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/sha256.c') diff --git a/src/nvim/sha256.c b/src/nvim/sha256.c index f0a9aecdcc..cc988812d5 100644 --- a/src/nvim/sha256.c +++ b/src/nvim/sha256.c @@ -230,7 +230,7 @@ void sha256_finish(context_sha256_T *ctx, uint8_t digest[SHA256_SUM_SIZE]) uint8_t msglen[8]; high = (ctx->total[0] >> 29) | (ctx->total[1] << 3); - low = (ctx->total[0] << 3); + low = (ctx->total[0] << 3); PUT_UINT32(high, msglen, 0); PUT_UINT32(low, msglen, 4); -- cgit From 353a4be7e84fdc101318215bdcc8a7e780d737fe Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sun, 12 Nov 2023 13:13:58 +0100 Subject: build: remove PVS We already have an extensive suite of static analysis tools we use, which causes a fair bit of redundancy as we get duplicate warnings. PVS is also prone to give false warnings which creates a lot of work to identify and disable. --- src/nvim/sha256.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/nvim/sha256.c') diff --git a/src/nvim/sha256.c b/src/nvim/sha256.c index cc988812d5..d179a0c279 100644 --- a/src/nvim/sha256.c +++ b/src/nvim/sha256.c @@ -1,6 +1,3 @@ -// This is an open source non-commercial project. Dear PVS-Studio, please check -// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com - /// @file sha256.c /// /// FIPS-180-2 compliant SHA-256 implementation -- cgit From 79b6ff28ad1204fbb4199b9092f5c578d88cb28e Mon Sep 17 00:00:00 2001 From: dundargoc Date: Tue, 28 Nov 2023 20:31:00 +0100 Subject: refactor: fix headers with IWYU --- src/nvim/sha256.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/sha256.c') diff --git a/src/nvim/sha256.c b/src/nvim/sha256.c index d179a0c279..1a07c0856d 100644 --- a/src/nvim/sha256.c +++ b/src/nvim/sha256.c @@ -16,7 +16,7 @@ #include #include "nvim/sha256.h" -#include "nvim/vim.h" +#include "nvim/vim_defs.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "sha256.c.generated.h" -- cgit From 86cc791debba09c8ed1aa0d863be844108866a38 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 29 Nov 2023 23:10:21 +0800 Subject: refactor: move function macros out of vim_defs.h (#26300) --- src/nvim/sha256.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/sha256.c') diff --git a/src/nvim/sha256.c b/src/nvim/sha256.c index 1a07c0856d..d49224a987 100644 --- a/src/nvim/sha256.c +++ b/src/nvim/sha256.c @@ -15,8 +15,8 @@ #include #include +#include "nvim/memory.h" #include "nvim/sha256.h" -#include "nvim/vim_defs.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "sha256.c.generated.h" -- cgit