]> granicus.if.org Git - vim/commitdiff
patch 8.2.3481: failures when char is unsigned v8.2.3481
authorJames McCoy <jamessan@jamessan.com>
Tue, 5 Oct 2021 18:44:04 +0000 (19:44 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 5 Oct 2021 18:44:04 +0000 (19:44 +0100)
Problem:    Failures when char is unsigned.
Solution:   Use int8_T.  Make a CI run with unsigned char. (James McCoy,
            closes #8936)

.github/workflows/ci.yml
src/structs.h
src/version.c

index c3cc065bef8a25d1729af07362aff59b6b04309b..5bfcc79e9ea6af7626402aa1157cff61613b8b64 100644 (file)
@@ -40,6 +40,7 @@ jobs:
             compiler: gcc
             coverage: true
             extra: testgui
+            uchar: true
           - features: huge
             compiler: clang
             extra: asan
@@ -111,10 +112,14 @@ jobs:
             ;;
           esac
 
+          CFLAGS=""
           if ${{ matrix.coverage == true }}; then
-            echo "CFLAGS=--coverage -DUSE_GCOV_FLUSH"
+            CFLAGS="$CFLAGS --coverage -DUSE_GCOV_FLUSH"
             echo "LDFLAGS=--coverage"
           fi
+          if ${{ matrix.uchar == true }}; then
+            CFLAGS="$CFLAGS -funsigned-char"
+          fi
           if ${{ contains(matrix.extra, 'testgui') }}; then
             echo "TEST=-C src testgui"
           fi
@@ -130,6 +135,7 @@ jobs:
           if ${{ contains(matrix.extra, 'vimtags') }}; then
             echo "TEST=-C runtime/doc vimtags VIMEXE=../../${SRCDIR}/vim"
           fi
+          echo "CFLAGS=$CFLAGS"
           ) >> $GITHUB_ENV
 
       - name: Set up system
index b5889b77616d4f350bd0fe6f27d5e36235275c95..0715686f7ff4ab0f4beae6ef2a26b29bff9d4721 100644 (file)
@@ -1406,8 +1406,8 @@ typedef struct type_S type_T;
 struct type_S {
     vartype_T      tt_type;
     int8_T         tt_argcount;    // for func, incl. vararg, -1 for unknown
-    char           tt_min_argcount; // number of non-optional arguments
-    char           tt_flags;       // TTFLAG_ values
+    int8_T         tt_min_argcount; // number of non-optional arguments
+    char_u         tt_flags;       // TTFLAG_ values
     type_T         *tt_member;     // for list, dict, func return type
     type_T         **tt_args;      // func argument types, allocated
 };
index 70f363a421bde8b7d253476305ae963dbeaf2f47..31fb2a618112c9422aa4651934431c585aa3eca6 100644 (file)
@@ -757,6 +757,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3481,
 /**/
     3480,
 /**/