mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
fix: compiler warnings from clang 15 (#20321)
Add -Wno-strict-prototypes flag to external dependencies to suppress cjson warnings. These needs to be fixed upstream first.
This commit is contained in:
@@ -159,7 +159,7 @@ list(REMOVE_ITEM NVIM_SOURCES ${to_remove})
|
|||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
# xdiff, mpack, lua-cjson: inlined external project, we don't maintain it. #9306
|
# xdiff, mpack, lua-cjson: inlined external project, we don't maintain it. #9306
|
||||||
set_source_files_properties(
|
set_source_files_properties(
|
||||||
${EXTERNAL_SOURCES} PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-conversion -Wno-missing-noreturn -Wno-missing-format-attribute -Wno-double-promotion")
|
${EXTERNAL_SOURCES} PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-conversion -Wno-missing-noreturn -Wno-missing-format-attribute -Wno-double-promotion -Wno-strict-prototypes")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT "${MIN_LOG_LEVEL}" MATCHES "^$")
|
if(NOT "${MIN_LOG_LEVEL}" MATCHES "^$")
|
||||||
|
@@ -1249,14 +1249,12 @@ static void do_sort_uniq(typval_T *argvars, typval_T *rettv, bool sort)
|
|||||||
item_compare_func_ptr = item_compare_keeping_zero;
|
item_compare_func_ptr = item_compare_keeping_zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
int idx = 0;
|
|
||||||
for (listitem_T *li = TV_LIST_ITEM_NEXT(l, tv_list_first(l))
|
for (listitem_T *li = TV_LIST_ITEM_NEXT(l, tv_list_first(l))
|
||||||
; li != NULL;) {
|
; li != NULL;) {
|
||||||
listitem_T *const prev_li = TV_LIST_ITEM_PREV(l, li);
|
listitem_T *const prev_li = TV_LIST_ITEM_PREV(l, li);
|
||||||
if (item_compare_func_ptr(&prev_li, &li) == 0) {
|
if (item_compare_func_ptr(&prev_li, &li) == 0) {
|
||||||
li = tv_list_item_remove(l, li);
|
li = tv_list_item_remove(l, li);
|
||||||
} else {
|
} else {
|
||||||
idx++;
|
|
||||||
li = TV_LIST_ITEM_NEXT(l, li);
|
li = TV_LIST_ITEM_NEXT(l, li);
|
||||||
}
|
}
|
||||||
if (info.item_compare_func_err) { // -V547
|
if (info.item_compare_func_err) { // -V547
|
||||||
|
@@ -83,7 +83,6 @@ int get_keystroke(MultiQueue *events)
|
|||||||
int len = 0;
|
int len = 0;
|
||||||
int n;
|
int n;
|
||||||
int save_mapped_ctrl_c = mapped_ctrl_c;
|
int save_mapped_ctrl_c = mapped_ctrl_c;
|
||||||
int waited = 0;
|
|
||||||
|
|
||||||
mapped_ctrl_c = 0; // mappings are not used here
|
mapped_ctrl_c = 0; // mappings are not used here
|
||||||
for (;;) {
|
for (;;) {
|
||||||
@@ -110,10 +109,8 @@ int get_keystroke(MultiQueue *events)
|
|||||||
// Replace zero and K_SPECIAL by a special key code.
|
// Replace zero and K_SPECIAL by a special key code.
|
||||||
n = fix_input_buffer(buf + len, n);
|
n = fix_input_buffer(buf + len, n);
|
||||||
len += n;
|
len += n;
|
||||||
waited = 0;
|
|
||||||
} else if (len > 0) {
|
|
||||||
waited++; // keep track of the waiting time
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (n > 0) { // found a termcode: adjust length
|
if (n > 0) { // found a termcode: adjust length
|
||||||
len = n;
|
len = n;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user