0
0
mirror of https://github.com/vim/vim.git synced 2025-10-28 09:27:14 -04:00

patch 9.0.1234: the code style has to be checked manually

Problem:    The code style has to be checked manually.
Solution:   Add basic code style checks in a test.  Fix or avoid uncovered
            problems.
This commit is contained in:
Bram Moolenaar
2023-01-22 21:14:53 +00:00
parent 3d79f0a430
commit ebfec1c531
34 changed files with 319 additions and 149 deletions

View File

@@ -517,7 +517,8 @@ bf_self_test(void)
// We can't simply use sizeof(UINT32_T), it would generate a compiler
// warning.
if (ui != 0xffffffffUL || ui + 1 != 0) {
if (ui != 0xffffffffUL || ui + 1 != 0)
{
err++;
emsg(_(e_sizeof_uint32_isnot_four));
}
@@ -573,13 +574,15 @@ bf_cfb_init(
}
}
#define BF_CFB_UPDATE(bfs, c) { \
#define BF_CFB_UPDATE(bfs, c) \
{ \
bfs->cfb_buffer[bfs->update_offset] ^= (char_u)c; \
if (++bfs->update_offset == bfs->cfb_len) \
bfs->update_offset = 0; \
}
#define BF_RANBYTE(bfs, t) { \
#define BF_RANBYTE(bfs, t) \
{ \
if ((bfs->randbyte_offset & BF_BLOCK_MASK) == 0) \
bf_e_cblock(bfs, &(bfs->cfb_buffer[bfs->randbyte_offset])); \
t = bfs->cfb_buffer[bfs->randbyte_offset]; \