aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/ci.yml4
-rwxr-xr-x.github/workflows/env.sh5
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/nvim/buffer_updates.c2
-rw-r--r--src/nvim/edit.c4
-rw-r--r--src/nvim/extmark.c10
-rw-r--r--src/nvim/extmark.h2
7 files changed, 19 insertions, 10 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ea3185d2a1..1aa0906ffc 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -119,6 +119,10 @@ jobs:
cc: clang-13
runner: ubuntu-20.04
os: linux
+ - flavor: uchar
+ cc: gcc
+ runner: ubuntu-20.04
+ os: linux
- cc: clang
runner: macos-10.15
os: osx
diff --git a/.github/workflows/env.sh b/.github/workflows/env.sh
index bd170f92fb..ca1194efa9 100755
--- a/.github/workflows/env.sh
+++ b/.github/workflows/env.sh
@@ -45,6 +45,11 @@ TSAN_OPTIONS=log_path=$GITHUB_WORKSPACE/build/log/tsan
CLANG_SANITIZER=TSAN
EOF
;;
+ uchar)
+ cat <<EOF >> "$GITHUB_ENV"
+BUILD_UCHAR=1
+EOF
+ ;;
lint)
# Re-enable once system deps are available
# BUILD_FLAGS="$BUILD_FLAGS -DLIBLUV_LIBRARY:FILEPATH=/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/lua/5.1/luv.so -DLIBLUV_INCLUDE_DIR:PATH=/usr/include/lua5.1"
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 82d9a42db2..01df172ed4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -370,7 +370,7 @@ option(CI_BUILD "CI, extra flags will be set" OFF)
if(CI_BUILD)
message(STATUS "CI build enabled")
add_compile_options(-Werror)
- if(DEFINED ENV{BUILD_32BIT})
+ if(DEFINED ENV{BUILD_UCHAR})
# Get some test coverage for unsigned char
add_compile_options(-funsigned-char)
endif()
diff --git a/src/nvim/buffer_updates.c b/src/nvim/buffer_updates.c
index 49e3a03dac..3e2d04b3a2 100644
--- a/src/nvim/buffer_updates.c
+++ b/src/nvim/buffer_updates.c
@@ -299,7 +299,7 @@ void buf_updates_send_changes(buf_T *buf, linenr_T firstline, int64_t num_added,
kv_size(buf->update_callbacks) = j;
}
-void buf_updates_send_splice(buf_T *buf, linenr_T start_row, colnr_T start_col, bcount_t start_byte,
+void buf_updates_send_splice(buf_T *buf, int start_row, colnr_T start_col, bcount_t start_byte,
int old_row, colnr_T old_col, bcount_t old_byte, int new_row,
colnr_T new_col, bcount_t new_byte)
{
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index ab80f09228..a608612af5 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -2002,7 +2002,7 @@ void change_indent(int type, int amount, int round, int replaced, int call_chang
// TODO(bfredl): test for crazy edge cases, like we stand on a TAB or
// something? does this even do the right text change then?
int delta = orig_col - new_col;
- extmark_splice_cols(curbuf, curwin->w_cursor.lnum - 1, new_col,
+ extmark_splice_cols(curbuf, (int)curwin->w_cursor.lnum - 1, new_col,
delta < 0 ? -delta : 0,
delta > 0 ? delta : 0,
kExtmarkUndo);
@@ -9118,7 +9118,7 @@ static bool ins_tab(void)
}
}
if (!(State & VREPLACE_FLAG)) {
- extmark_splice_cols(curbuf, fpos.lnum - 1, change_col,
+ extmark_splice_cols(curbuf, (int)fpos.lnum - 1, change_col,
cursor->col - change_col, fpos.col - change_col,
kExtmarkUndo);
}
diff --git a/src/nvim/extmark.c b/src/nvim/extmark.c
index 09ea2be4fe..f367bc66e0 100644
--- a/src/nvim/extmark.c
+++ b/src/nvim/extmark.c
@@ -417,7 +417,7 @@ static void u_extmark_set(buf_T *buf, uint64_t mark, int row, colnr_T col)
///
/// useful when we cannot simply reverse the operation. This will do nothing on
/// redo, enforces correct position when undo.
-void u_extmark_copy(buf_T *buf, linenr_T l_row, colnr_T l_col, linenr_T u_row, colnr_T u_col)
+void u_extmark_copy(buf_T *buf, int l_row, colnr_T l_col, int u_row, colnr_T u_col)
{
u_header_T *uhp = u_force_get_undo_header(buf);
if (!uhp) {
@@ -553,7 +553,7 @@ void extmark_adjust(buf_T *buf, linenr_T line1, linenr_T line2, long amount, lon
// the end column of the new region.
// @param new_byte Byte extent of the new region.
// @param undo
-void extmark_splice(buf_T *buf, linenr_T start_row, colnr_T start_col, int old_row, colnr_T old_col,
+void extmark_splice(buf_T *buf, int start_row, colnr_T start_col, int old_row, colnr_T old_col,
bcount_t old_byte, int new_row, colnr_T new_col, bcount_t new_byte,
ExtmarkOp undo)
{
@@ -573,7 +573,7 @@ void extmark_splice(buf_T *buf, linenr_T start_row, colnr_T start_col, int old_r
undo);
}
-void extmark_splice_impl(buf_T *buf, linenr_T start_row, colnr_T start_col, bcount_t start_byte,
+void extmark_splice_impl(buf_T *buf, int start_row, colnr_T start_col, bcount_t start_byte,
int old_row, colnr_T old_col, bcount_t old_byte, int new_row,
colnr_T new_col, bcount_t new_byte, ExtmarkOp undo)
{
@@ -588,7 +588,7 @@ void extmark_splice_impl(buf_T *buf, linenr_T start_row, colnr_T start_col, bcou
// beginning and right-gravity at the end need not be preserved.
// Also be smart about marks that already have been saved (important for
// merge!)
- linenr_T end_row = start_row + old_row;
+ int end_row = start_row + old_row;
int end_col = (old_row ? 0 : start_col) + old_col;
u_extmark_copy(buf, start_row, start_col, end_row, end_col);
}
@@ -656,7 +656,7 @@ void extmark_splice_impl(buf_T *buf, linenr_T start_row, colnr_T start_col, bcou
}
}
-void extmark_splice_cols(buf_T *buf, linenr_T start_row, colnr_T start_col, colnr_T old_col,
+void extmark_splice_cols(buf_T *buf, int start_row, colnr_T start_col, colnr_T old_col,
colnr_T new_col, ExtmarkOp undo)
{
extmark_splice(buf, start_row, start_col,
diff --git a/src/nvim/extmark.h b/src/nvim/extmark.h
index 84d1e8d03b..b856a1148f 100644
--- a/src/nvim/extmark.h
+++ b/src/nvim/extmark.h
@@ -29,7 +29,7 @@ typedef ptrdiff_t bcount_t;
// delete the columns between mincol and endcol
typedef struct {
- linenr_T start_row;
+ int start_row;
colnr_T start_col;
int old_row;
colnr_T old_col;