style/lint

This commit is contained in:
AdnoC
2017-05-29 11:31:06 -04:00
parent 336412e1db
commit 0c3dea5c4d
3 changed files with 15 additions and 12 deletions

View File

@@ -5860,6 +5860,7 @@ const yankreg_T *op_register_get(const char name)
///
/// @return true on success, false on failure.
bool op_register_set_previous(const char name)
FUNC_ATTR_WARN_UNUSED_RESULT
{
int i = op_reg_index(name);
if (i == -1) {

View File

@@ -285,9 +285,9 @@ typedef struct {
char name;
MotionType type;
char **contents;
bool is_unnamed;
size_t contents_size;
size_t width;
bool is_unnamed;
dict_T *additional_data;
} reg;
struct global_var {
@@ -2329,12 +2329,14 @@ static inline void add_search_pattern(PossiblyFreedShadaEntry *const ret_pse,
}
}
/// Initializes registers for writing to the ShaDa file
/// Initialize registers for writing to the ShaDa file
///
/// @param[in] wms The WriteMergerState used when writing.
/// @param[in] max_reg_lines The maximum number of register lines.
static void shada_initialize_registers(WriteMergerState *const wms,
int max_reg_lines) {
static inline void shada_initialize_registers(WriteMergerState *const wms,
int max_reg_lines)
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_ALWAYS_INLINE
{
const void *reg_iter = NULL;
const bool limit_reg_lines = max_reg_lines >= 0;
do {
@@ -2345,7 +2347,7 @@ static void shada_initialize_registers(WriteMergerState *const wms,
if (name == NUL) {
break;
}
if (limit_reg_lines && reg.y_size > max_reg_lines) {
if (limit_reg_lines && reg.y_size > (size_t)max_reg_lines) {
continue;
}
wms->registers[op_reg_index(name)] = (PossiblyFreedShadaEntry) {