diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/clint.py | 3 | ||||
-rw-r--r-- | src/nvim/api/private/helpers.c | 14 | ||||
-rw-r--r-- | src/nvim/eval.c | 2 | ||||
-rw-r--r-- | src/nvim/eval_defs.h | 2 | ||||
-rw-r--r-- | src/nvim/msgpack_rpc/channel.c | 4 | ||||
-rw-r--r-- | src/nvim/msgpack_rpc/helpers.c | 14 | ||||
-rw-r--r-- | src/nvim/option.c | 2 |
7 files changed, 21 insertions, 20 deletions
diff --git a/src/clint.py b/src/clint.py index 80e4c4ac39..efc5f18378 100755 --- a/src/clint.py +++ b/src/clint.py @@ -2515,7 +2515,8 @@ def CheckSpacing(filename, clean_lines, linenum, nesting_state, error): 'after the hash') cast_line = re.sub(r'^# *define +\w+\([^)]*\)', '', line) - match = Search(r'\((?:const )?(?:struct )?[a-zA-Z_]\w*(?: *\*(?:const)?)*\)' + match = Search(r'(?<!\bkvec_t)' + r'\((?:const )?(?:struct )?[a-zA-Z_]\w*(?: *\*(?:const)?)*\)' r' +' r'-?(?:\*+|&)?(?:\w+|\+\+|--|\()', cast_line) if match and line[0] == ' ': diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c index 0d527b0629..c88bf2127a 100644 --- a/src/nvim/api/private/helpers.c +++ b/src/nvim/api/private/helpers.c @@ -323,20 +323,20 @@ void set_option_to(void *to, int type, String name, Object value, Error *err) kv_push(edata->stack, NIL) #define TYPVAL_ENCODE_CONV_BOOL(num) \ - kv_push(edata->stack, BOOLEAN_OBJ((Boolean) (num))) + kv_push(edata->stack, BOOLEAN_OBJ((Boolean)(num))) #define TYPVAL_ENCODE_CONV_NUMBER(num) \ - kv_push(edata->stack, INTEGER_OBJ((Integer) (num))) + kv_push(edata->stack, INTEGER_OBJ((Integer)(num))) #define TYPVAL_ENCODE_CONV_UNSIGNED_NUMBER TYPVAL_ENCODE_CONV_NUMBER #define TYPVAL_ENCODE_CONV_FLOAT(flt) \ - kv_push(edata->stack, FLOATING_OBJ((Float) (flt))) + kv_push(edata->stack, FLOATING_OBJ((Float)(flt))) #define TYPVAL_ENCODE_CONV_STRING(str, len) \ do { \ - const size_t len_ = (size_t) (len); \ - const char *const str_ = (const char *) (str); \ + const size_t len_ = (size_t)(len); \ + const char *const str_ = (const char *)(str); \ assert(len_ == 0 || str_ != NULL); \ kv_push(edata->stack, STRING_OBJ(((String) { \ .data = xmemdupz((len_?str_:""), len_), \ @@ -372,7 +372,7 @@ static inline void typval_encode_list_start(EncodedData *const edata, } #define TYPVAL_ENCODE_CONV_LIST_START(len) \ - typval_encode_list_start(edata, (size_t) (len)) + typval_encode_list_start(edata, (size_t)(len)) static inline void typval_encode_between_list_items(EncodedData *const edata) FUNC_ATTR_ALWAYS_INLINE FUNC_ATTR_NONNULL_ALL @@ -413,7 +413,7 @@ static inline void typval_encode_dict_start(EncodedData *const edata, } #define TYPVAL_ENCODE_CONV_DICT_START(len) \ - typval_encode_dict_start(edata, (size_t) (len)) + typval_encode_dict_start(edata, (size_t)(len)) #define TYPVAL_ENCODE_CONV_SPECIAL_DICT_KEY_CHECK(label, kv_pair) diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 2a4d06b1e7..f5cffbc3e1 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -18162,7 +18162,7 @@ void free_tv(typval_T *varp) #define TYPVAL_ENCODE_CONV_NUMBER(ignored) \ do { \ - (void) ignored; \ + (void)ignored; \ tv->vval.v_number = 0; \ tv->v_lock = VAR_UNLOCKED; \ } while (0) diff --git a/src/nvim/eval_defs.h b/src/nvim/eval_defs.h index 9000c06719..d5c9b2c1ec 100644 --- a/src/nvim/eval_defs.h +++ b/src/nvim/eval_defs.h @@ -157,7 +157,7 @@ typedef struct list_stack_S { /// Convert a hashitem value pointer to a dictitem pointer #define HIVAL2DI(p) \ - ((dictitem_T *)(((char *) p) - offsetof(dictitem_T, di_tv))) + ((dictitem_T *)(((char *)p) - offsetof(dictitem_T, di_tv))) /// Convert a hashitem pointer to a dictitem pointer #define HI2DI(hi) HIKEY2DI((hi)->hi_key) diff --git a/src/nvim/msgpack_rpc/channel.c b/src/nvim/msgpack_rpc/channel.c index b14278a554..5b249ee1c7 100644 --- a/src/nvim/msgpack_rpc/channel.c +++ b/src/nvim/msgpack_rpc/channel.c @@ -857,8 +857,8 @@ static void log_server_msg(uint64_t channel_id, log_msg_close(f, (msgpack_object) { .type = MSGPACK_OBJECT_STR, .via.str = { - .ptr = (char *) msgpack_error_messages[result + MUR_OFF], - .size = (uint32_t) strlen( + .ptr = (char *)msgpack_error_messages[result + MUR_OFF], + .size = (uint32_t)strlen( msgpack_error_messages[result + MUR_OFF]), }, }); diff --git a/src/nvim/msgpack_rpc/helpers.c b/src/nvim/msgpack_rpc/helpers.c index 8ff316671f..9195b10614 100644 --- a/src/nvim/msgpack_rpc/helpers.c +++ b/src/nvim/msgpack_rpc/helpers.c @@ -109,7 +109,7 @@ bool msgpack_rpc_to_object(const msgpack_object *const obj, Object *const arg) if (cur.mobj->via.u64 > API_INTEGER_MAX) { ret = false; } else { - *cur.aobj = INTEGER_OBJ((Integer) cur.mobj->via.u64); + *cur.aobj = INTEGER_OBJ((Integer)cur.mobj->via.u64); } break; } @@ -135,7 +135,7 @@ bool msgpack_rpc_to_object(const msgpack_object *const obj, Object *const arg) const size_t size = cur.mobj->via.array.size; if (cur.container) { if (cur.idx >= size) { - (void) kv_pop(stack); + (void)kv_pop(stack); } else { const size_t idx = cur.idx; cur.idx++; @@ -163,7 +163,7 @@ bool msgpack_rpc_to_object(const msgpack_object *const obj, Object *const arg) const size_t size = cur.mobj->via.map.size; if (cur.container) { if (cur.idx >= size) { - (void) kv_pop(stack); + (void)kv_pop(stack); } else { const size_t idx = cur.idx; cur.idx++; @@ -232,7 +232,7 @@ bool msgpack_rpc_to_object(const msgpack_object *const obj, Object *const arg) #undef STR_CASE } if (!cur.container) { - (void) kv_pop(stack); + (void)kv_pop(stack); } } kv_destroy(stack); @@ -384,7 +384,7 @@ void msgpack_rpc_from_object(const Object result, msgpack_packer *const res) const size_t size = cur.aobj->data.array.size; if (cur.container) { if (cur.idx >= size) { - (void) kv_pop(stack); + (void)kv_pop(stack); } else { const size_t idx = cur.idx; cur.idx++; @@ -405,7 +405,7 @@ void msgpack_rpc_from_object(const Object result, msgpack_packer *const res) const size_t size = cur.aobj->data.dictionary.size; if (cur.container) { if (cur.idx >= size) { - (void) kv_pop(stack); + (void)kv_pop(stack); } else { const size_t idx = cur.idx; cur.idx++; @@ -426,7 +426,7 @@ void msgpack_rpc_from_object(const Object result, msgpack_packer *const res) } } if (!cur.container) { - (void) kv_pop(stack); + (void)kv_pop(stack); } } kv_destroy(stack); diff --git a/src/nvim/option.c b/src/nvim/option.c index ffe75c7047..c1d040afeb 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -4656,7 +4656,7 @@ set_option_value ( return NULL; } if (flags & P_STRING) { - const char *s = (char *) string; + const char *s = (const char *)string; if (s == NULL) { s = ""; } |