mirror of
https://github.com/neovim/neovim.git
synced 2025-12-17 03:45:42 +00:00
Merge #8142 'build/msvc: fix some warnings'
This commit is contained in:
@@ -121,6 +121,7 @@ cache:
|
|||||||
directories:
|
directories:
|
||||||
- "$HOME/.cache/pip"
|
- "$HOME/.cache/pip"
|
||||||
- "$HOME/.cache/nvim-deps"
|
- "$HOME/.cache/nvim-deps"
|
||||||
|
- "$HOME/.cache/nvim-deps-downloads"
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
webhooks:
|
webhooks:
|
||||||
|
|||||||
@@ -11,10 +11,17 @@ source "${CI_DIR}/common/suite.sh"
|
|||||||
rm -rf "${HOME}/.cache/pip/log"
|
rm -rf "${HOME}/.cache/pip/log"
|
||||||
rm -f "${HOME}/.cache/pip/selfcheck.json"
|
rm -f "${HOME}/.cache/pip/selfcheck.json"
|
||||||
|
|
||||||
|
echo "before_cache.sh: cache size"
|
||||||
|
du -d 2 "${HOME}/.cache" | sort -n
|
||||||
|
|
||||||
# Update the third-party dependency cache only if the build was successful.
|
# Update the third-party dependency cache only if the build was successful.
|
||||||
if ended_successfully; then
|
if ended_successfully; then
|
||||||
rm -rf "${HOME}/.cache/nvim-deps"
|
rm -rf "${HOME}/.cache/nvim-deps"
|
||||||
mv "${DEPS_BUILD_DIR}" "${HOME}/.cache/nvim-deps"
|
mv "${DEPS_BUILD_DIR}" "${HOME}/.cache/nvim-deps"
|
||||||
|
|
||||||
|
rm -rf "${HOME}/.cache/nvim-deps-downloads"
|
||||||
|
mv "${DEPS_DOWNLOAD_DIR}" "${HOME}/.cache/nvim-deps-downloads"
|
||||||
|
|
||||||
touch "${CACHE_MARKER}"
|
touch "${CACHE_MARKER}"
|
||||||
echo "Updated third-party dependencies (timestamp: $(_stat "${CACHE_MARKER}"))."
|
echo "Updated third-party dependencies (timestamp: $(_stat "${CACHE_MARKER}"))."
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -26,13 +26,14 @@ build_deps() {
|
|||||||
DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} -DUSE_BUNDLED_LUA=ON"
|
DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} -DUSE_BUNDLED_LUA=ON"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf "${DEPS_BUILD_DIR}"
|
|
||||||
mkdir -p "${DEPS_BUILD_DIR}"
|
mkdir -p "${DEPS_BUILD_DIR}"
|
||||||
|
mkdir -p "${DEPS_DOWNLOAD_DIR}"
|
||||||
|
|
||||||
# Use cached dependencies if $CACHE_MARKER exists.
|
# Use cached dependencies if $CACHE_MARKER exists.
|
||||||
if test -f "${CACHE_MARKER}" && ! test "${CACHE_ENABLE}" = "false" ; then
|
if test -f "${CACHE_MARKER}" && ! test "${CACHE_ENABLE}" = "false" ; then
|
||||||
echo "Using third-party dependencies from Travis cache (last update: $(_stat "${CACHE_MARKER}"))."
|
echo "Using third-party dependencies from Travis cache (last update: $(_stat "${CACHE_MARKER}"))."
|
||||||
cp -r "${HOME}/.cache/nvim-deps" "${DEPS_BUILD_DIR}"
|
cp -r "${HOME}/.cache/nvim-deps" "${DEPS_BUILD_DIR}"
|
||||||
|
cp -r "${HOME}/.cache/nvim-deps-downloads" "${DEPS_DOWNLOAD_DIR}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Even if we're using cached dependencies, run CMake and make to
|
# Even if we're using cached dependencies, run CMake and make to
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ typedef enum {
|
|||||||
/// Internal call from lua code
|
/// Internal call from lua code
|
||||||
#define LUA_INTERNAL_CALL (VIML_INTERNAL_CALL + 1)
|
#define LUA_INTERNAL_CALL (VIML_INTERNAL_CALL + 1)
|
||||||
|
|
||||||
static inline bool is_internal_call(uint64_t channel_id)
|
static inline bool is_internal_call(const uint64_t channel_id)
|
||||||
REAL_FATTR_ALWAYS_INLINE REAL_FATTR_CONST;
|
REAL_FATTR_ALWAYS_INLINE REAL_FATTR_CONST;
|
||||||
|
|
||||||
/// Check whether call is internal
|
/// Check whether call is internal
|
||||||
|
|||||||
@@ -567,7 +567,7 @@ static inline void typval_encode_dict_end(EncodedData *const edata)
|
|||||||
typval_encode_dict_end(edata)
|
typval_encode_dict_end(edata)
|
||||||
|
|
||||||
#define TYPVAL_ENCODE_CONV_RECURSE(val, conv_type) \
|
#define TYPVAL_ENCODE_CONV_RECURSE(val, conv_type) \
|
||||||
TYPVAL_ENCODE_CONV_NIL()
|
TYPVAL_ENCODE_CONV_NIL(val)
|
||||||
|
|
||||||
#define TYPVAL_ENCODE_SCOPE static
|
#define TYPVAL_ENCODE_SCOPE static
|
||||||
#define TYPVAL_ENCODE_NAME object
|
#define TYPVAL_ENCODE_NAME object
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ static inline bool ascii_isxdigit(int c)
|
|||||||
/// Checks if `c` is an “identifier” character
|
/// Checks if `c` is an “identifier” character
|
||||||
///
|
///
|
||||||
/// That is, whether it is alphanumeric character or underscore.
|
/// That is, whether it is alphanumeric character or underscore.
|
||||||
static inline bool ascii_isident(const int c)
|
static inline bool ascii_isident(int c)
|
||||||
{
|
{
|
||||||
return ASCII_ISALNUM(c) || c == '_';
|
return ASCII_ISALNUM(c) || c == '_';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -206,11 +206,11 @@ struct dictitem_S {
|
|||||||
char_u di_key[1]; ///< key (actually longer!)
|
char_u di_key[1]; ///< key (actually longer!)
|
||||||
};
|
};
|
||||||
|
|
||||||
#define TV_DICTITEM_STRUCT(KEY_LEN) \
|
#define TV_DICTITEM_STRUCT(...) \
|
||||||
struct { \
|
struct { \
|
||||||
typval_T di_tv; /* Structure that holds scope dictionary itself. */ \
|
typval_T di_tv; /* Structure that holds scope dictionary itself. */ \
|
||||||
uint8_t di_flags; /* Flags. */ \
|
uint8_t di_flags; /* Flags. */ \
|
||||||
char_u di_key[KEY_LEN]; /* Key value. */ \
|
char_u di_key[__VA_ARGS__]; /* Key value. */ \
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Structure to hold a scope dictionary
|
/// Structure to hold a scope dictionary
|
||||||
|
|||||||
@@ -423,7 +423,7 @@ nlua_pop_typval_table_processing_end:
|
|||||||
#define TYPVAL_ENCODE_CONV_STR_STRING TYPVAL_ENCODE_CONV_STRING
|
#define TYPVAL_ENCODE_CONV_STR_STRING TYPVAL_ENCODE_CONV_STRING
|
||||||
|
|
||||||
#define TYPVAL_ENCODE_CONV_EXT_STRING(tv, str, len, type) \
|
#define TYPVAL_ENCODE_CONV_EXT_STRING(tv, str, len, type) \
|
||||||
TYPVAL_ENCODE_CONV_NIL()
|
TYPVAL_ENCODE_CONV_NIL(tv)
|
||||||
|
|
||||||
#define TYPVAL_ENCODE_CONV_FUNC_START(tv, fun) \
|
#define TYPVAL_ENCODE_CONV_FUNC_START(tv, fun) \
|
||||||
do { \
|
do { \
|
||||||
|
|||||||
@@ -145,10 +145,7 @@
|
|||||||
#define ARRAY_SIZE(arr) ((sizeof(arr)/sizeof((arr)[0])) / ((size_t)(!(sizeof(arr) % sizeof((arr)[0])))))
|
#define ARRAY_SIZE(arr) ((sizeof(arr)/sizeof((arr)[0])) / ((size_t)(!(sizeof(arr) % sizeof((arr)[0])))))
|
||||||
|
|
||||||
// Duplicated in os/win_defs.h to avoid include-order sensitivity.
|
// Duplicated in os/win_defs.h to avoid include-order sensitivity.
|
||||||
#if defined(WIN32) && defined(RGB)
|
#define RGB_(r, g, b) ((r << 16) | (g << 8) | b)
|
||||||
# undef RGB
|
|
||||||
#endif
|
|
||||||
#define RGB(r, g, b) ((r << 16) | (g << 8) | b)
|
|
||||||
|
|
||||||
#define STR_(x) #x
|
#define STR_(x) #x
|
||||||
#define STR(x) STR_(x)
|
#define STR(x) STR_(x)
|
||||||
|
|||||||
@@ -32,11 +32,8 @@
|
|||||||
|
|
||||||
// Windows defines a RGB macro that produces 0x00bbggrr color values for use
|
// Windows defines a RGB macro that produces 0x00bbggrr color values for use
|
||||||
// with GDI. Our macro is different, and we don't use GDI.
|
// with GDI. Our macro is different, and we don't use GDI.
|
||||||
#if defined(RGB)
|
|
||||||
# undef RGB
|
|
||||||
// Duplicated from macros.h to avoid include-order sensitivity.
|
// Duplicated from macros.h to avoid include-order sensitivity.
|
||||||
# define RGB(r, g, b) ((r << 16) | (g << 8) | b)
|
#define RGB_(r, g, b) ((r << 16) | (g << 8) | b)
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
# ifndef inline
|
# ifndef inline
|
||||||
|
|||||||
1358
src/nvim/syntax.c
1358
src/nvim/syntax.c
File diff suppressed because it is too large
Load Diff
@@ -180,13 +180,14 @@ void terminal_init(void)
|
|||||||
vterm_state_get_palette_color(state, color_index, &color);
|
vterm_state_get_palette_color(state, color_index, &color);
|
||||||
}
|
}
|
||||||
map_put(int, int)(color_indexes,
|
map_put(int, int)(color_indexes,
|
||||||
RGB(color.red, color.green, color.blue), color_index + 1);
|
RGB_(color.red, color.green, color.blue),
|
||||||
|
color_index + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
VTermColor fg, bg;
|
VTermColor fg, bg;
|
||||||
vterm_state_get_default_colors(state, &fg, &bg);
|
vterm_state_get_default_colors(state, &fg, &bg);
|
||||||
default_vt_fg = RGB(fg.red, fg.green, fg.blue);
|
default_vt_fg = RGB_(fg.red, fg.green, fg.blue);
|
||||||
default_vt_bg = RGB(bg.red, bg.green, bg.blue);
|
default_vt_bg = RGB_(bg.red, bg.green, bg.blue);
|
||||||
default_vt_bg_rgb = bg;
|
default_vt_bg_rgb = bg;
|
||||||
vterm_free(vt);
|
vterm_free(vt);
|
||||||
}
|
}
|
||||||
@@ -565,8 +566,8 @@ void terminal_get_line_attributes(Terminal *term, win_T *wp, int linenr,
|
|||||||
VTermScreenCell cell;
|
VTermScreenCell cell;
|
||||||
fetch_cell(term, row, col, &cell);
|
fetch_cell(term, row, col, &cell);
|
||||||
// Get the rgb value set by libvterm.
|
// Get the rgb value set by libvterm.
|
||||||
int vt_fg = RGB(cell.fg.red, cell.fg.green, cell.fg.blue);
|
int vt_fg = RGB_(cell.fg.red, cell.fg.green, cell.fg.blue);
|
||||||
int vt_bg = RGB(cell.bg.red, cell.bg.green, cell.bg.blue);
|
int vt_bg = RGB_(cell.bg.red, cell.bg.green, cell.bg.blue);
|
||||||
vt_fg = vt_fg != default_vt_fg ? vt_fg : - 1;
|
vt_fg = vt_fg != default_vt_fg ? vt_fg : - 1;
|
||||||
vt_bg = vt_bg != default_vt_bg ? vt_bg : - 1;
|
vt_bg = vt_bg != default_vt_bg ? vt_bg : - 1;
|
||||||
// Since libvterm does not expose the color index used by the program, we
|
// Since libvterm does not expose the color index used by the program, we
|
||||||
|
|||||||
Reference in New Issue
Block a user