]> granicus.if.org Git - vim/commitdiff
patch 8.2.5073: clang on MS-Windows produces warnings v8.2.5073
authorBram Moolenaar <Bram@vim.org>
Thu, 9 Jun 2022 19:53:54 +0000 (20:53 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 9 Jun 2022 19:53:54 +0000 (20:53 +0100)
Problem:    Clang on MS-Windows produces warnings.
Solution:   Avoid the warnings. (Yegappan Lakshmanan, closes #10546)

12 files changed:
src/dosinst.c
src/dosinst.h
src/gui_dwrite.cpp
src/gui_w32.c
src/iscygpty.c
src/libvterm/src/vterm_internal.h
src/mbyte.c
src/os_win32.c
src/os_win32.h
src/term.c
src/version.c
src/xdiff/xinclude.h

index 23cf2d31f866716d3642726d3fa0b2c6c8c7e015..416528c0978d45e3e2df2d225ba02c5ff9202b9f 100644 (file)
@@ -439,7 +439,7 @@ static int num_windows;
  */
 //ARGSUSED
     static BOOL CALLBACK
-window_cb(HWND hwnd, LPARAM lparam)
+window_cb(HWND hwnd, LPARAM lparam UNUSED)
 {
     char title[256];
 
@@ -1170,7 +1170,7 @@ init_bat_choices(void)
  * Install the vimrc file.
  */
     static void
-install_vimrc(int idx)
+install_vimrc(int idx UNUSED)
 {
     FILE       *fd, *tfd;
     char       *fname;
@@ -1891,7 +1891,7 @@ build_shortcut(
  * Create shortcut(s) in the Start Menu\Programs\Vim folder.
  */
     static void
-install_start_menu(int idx)
+install_start_menu(int idx UNUSED)
 {
     need_uninstall_entry = 1;
     printf("Creating start menu\n");
index c262c4224bb67617fd6832ce1dd0f0bea0498d27..774a56d3dcbfb01a033bd0448d8637aa0ca625d7 100644 (file)
@@ -73,6 +73,12 @@ char *searchpath(char *name);
 #  define KEY_WOW64_32KEY 0x0200
 # endif
 
+#ifdef __MINGW32__
+# define UNUSED __attribute__((unused))
+#else
+# define UNUSED
+#endif
+
 #define VIM_STARTMENU "Programs\\Vim " VIM_VERSION_SHORT
 
 int    interactive;            // non-zero when running interactively
@@ -450,7 +456,7 @@ mch_chdir(char *path)
  * Expand the executable name into a full path name.
  */
     static char *
-my_fullpath(char *buf, char *fname, int len)
+my_fullpath(char *buf, char *fname UNUSED, int len)
 {
     // Only GetModuleFileName() will get the long file name path.
     // GetFullPathName() may still use the short (FAT) name.
index 62d23e72773b52fa82876541f2fc2764725de305..4f24390775ed623f51621051762027eebd1056c0 100644 (file)
 # define __out         SAL__out
 #endif
 
+#ifdef __MINGW32__
+# define UNUSED __attribute__((unused))
+#else
+# define UNUSED
+#endif
+
 #if (defined(_MSC_VER) && (_MSC_VER >= 1700)) || (__cplusplus >= 201103L)
 # define FINAL final
 #else
@@ -419,7 +425,7 @@ public:
     }
 
     IFACEMETHOD(IsPixelSnappingDisabled)(
-       __maybenull void* clientDrawingContext,
+       __maybenull void* clientDrawingContext UNUSED,
        __out BOOL* isDisabled)
     {
        *isDisabled = FALSE;
@@ -427,7 +433,7 @@ public:
     }
 
     IFACEMETHOD(GetCurrentTransform)(
-       __maybenull void* clientDrawingContext,
+       __maybenull void* clientDrawingContext UNUSED,
        __out DWRITE_MATRIX* transform)
     {
        // forward the render target's transform
@@ -437,7 +443,7 @@ public:
     }
 
     IFACEMETHOD(GetPixelsPerDip)(
-       __maybenull void* clientDrawingContext,
+       __maybenull void* clientDrawingContext UNUSED,
        __out FLOAT* pixelsPerDip)
     {
        float dpiX, unused;
@@ -447,33 +453,33 @@ public:
     }
 
     IFACEMETHOD(DrawUnderline)(
-       __maybenull void* clientDrawingContext,
-       FLOAT baselineOriginX,
-       FLOAT baselineOriginY,
-       __in DWRITE_UNDERLINE const* underline,
-       IUnknown* clientDrawingEffect)
+       __maybenull void* clientDrawingContext UNUSED,
+       FLOAT baselineOriginX UNUSED,
+       FLOAT baselineOriginY UNUSED,
+       __in DWRITE_UNDERLINE const* underline UNUSED,
+       IUnknown* clientDrawingEffect UNUSED)
     {
        return E_NOTIMPL;
     }
 
     IFACEMETHOD(DrawStrikethrough)(
-       __maybenull void* clientDrawingContext,
-       FLOAT baselineOriginX,
-       FLOAT baselineOriginY,
-       __in DWRITE_STRIKETHROUGH const* strikethrough,
-       IUnknown* clientDrawingEffect)
+       __maybenull void* clientDrawingContext UNUSED,
+       FLOAT baselineOriginX UNUSED,
+       FLOAT baselineOriginY UNUSED,
+       __in DWRITE_STRIKETHROUGH const* strikethrough UNUSED,
+       IUnknown* clientDrawingEffect UNUSED)
     {
        return E_NOTIMPL;
     }
 
     IFACEMETHOD(DrawInlineObject)(
-       __maybenull void* clientDrawingContext,
-       FLOAT originX,
-       FLOAT originY,
-       IDWriteInlineObject* inlineObject,
-       BOOL isSideways,
-       BOOL isRightToLeft,
-       IUnknown* clientDrawingEffect)
+       __maybenull void* clientDrawingContext UNUSED,
+       FLOAT originX UNUSED,
+       FLOAT originY UNUSED,
+       IDWriteInlineObject* inlineObject UNUSED,
+       BOOL isSideways UNUSED,
+       BOOL isRightToLeft UNUSED,
+       IUnknown* clientDrawingEffect UNUSED)
     {
        return E_NOTIMPL;
     }
@@ -482,10 +488,10 @@ public:
        __maybenull void* clientDrawingContext,
        FLOAT baselineOriginX,
        FLOAT baselineOriginY,
-       DWRITE_MEASURING_MODE measuringMode,
+       DWRITE_MEASURING_MODE measuringMode UNUSED,
        __in DWRITE_GLYPH_RUN const* glyphRun,
-       __in DWRITE_GLYPH_RUN_DESCRIPTION const* glyphRunDescription,
-       IUnknown* clientDrawingEffect)
+       __in DWRITE_GLYPH_RUN_DESCRIPTION const* glyphRunDescription UNUSED,
+       IUnknown* clientDrawingEffect UNUSED)
     {
        TextRendererContext *context =
            reinterpret_cast<TextRendererContext*>(clientDrawingContext);
index 3e1addbf91cca98d5394a84876c2775306172b41..cbfe6627ffd0111d1e7081fc293412b84a78f819 100644 (file)
@@ -392,7 +392,7 @@ stubGetDpiForSystem(void)
 }
 
     static int WINAPI
-stubGetSystemMetricsForDpi(int nIndex, UINT dpi)
+stubGetSystemMetricsForDpi(int nIndex, UINT dpi UNUSED)
 {
     return GetSystemMetrics(nIndex);
 }
@@ -4149,7 +4149,7 @@ init_mouse_wheel(void)
  * Mouse scroll event handler.
  */
     static void
-_OnMouseWheel(HWND hwnd, WPARAM wParam, LPARAM lParam, int horizontal)
+_OnMouseWheel(HWND hwnd UNUSED, WPARAM wParam, LPARAM lParam, int horizontal)
 {
     int                button;
     win_T      *wp;
@@ -4336,9 +4336,10 @@ static HWND hwndTip = NULL;
     static void
 show_sizing_tip(int cols, int rows)
 {
-    TOOLINFOA ti = {sizeof(ti)};
+    TOOLINFOA ti;
     char buf[32];
 
+    ti.cbSize = sizeof(ti);
     ti.hwnd = s_hwnd;
     ti.uId = (UINT_PTR)s_hwnd;
     ti.uFlags = TTF_SUBCLASS | TTF_IDISHWND;
@@ -4636,7 +4637,7 @@ _OnMenuSelect(HWND hwnd, WPARAM wParam, LPARAM lParam)
 #endif
 
     static LRESULT
-_OnDpiChanged(HWND hwnd, UINT xdpi, UINT ydpi, RECT *rc)
+_OnDpiChanged(HWND hwnd, UINT xdpi UNUSED, UINT ydpi, RECT *rc UNUSED)
 {
     s_dpi = ydpi;
     s_in_dpichanged = TRUE;
@@ -5106,12 +5107,12 @@ load_dpi_func(void)
     if (hUser32 == NULL)
        goto fail;
 
-    pGetDpiForSystem = (void*)GetProcAddress(hUser32, "GetDpiForSystem");
-    pGetDpiForWindow = (void*)GetProcAddress(hUser32, "GetDpiForWindow");
-    pGetSystemMetricsForDpi = (void*)GetProcAddress(hUser32, "GetSystemMetricsForDpi");
+    pGetDpiForSystem = (UINT (WINAPI *)(void))GetProcAddress(hUser32, "GetDpiForSystem");
+    pGetDpiForWindow = (UINT (WINAPI *)(HWND))GetProcAddress(hUser32, "GetDpiForWindow");
+    pGetSystemMetricsForDpi = (int (WINAPI *)(int, UINT))GetProcAddress(hUser32, "GetSystemMetricsForDpi");
     //pGetWindowDpiAwarenessContext = (void*)GetProcAddress(hUser32, "GetWindowDpiAwarenessContext");
-    pSetThreadDpiAwarenessContext = (void*)GetProcAddress(hUser32, "SetThreadDpiAwarenessContext");
-    pGetAwarenessFromDpiAwarenessContext = (void*)GetProcAddress(hUser32, "GetAwarenessFromDpiAwarenessContext");
+    pSetThreadDpiAwarenessContext = (DPI_AWARENESS_CONTEXT (WINAPI *)(DPI_AWARENESS_CONTEXT))GetProcAddress(hUser32, "SetThreadDpiAwarenessContext");
+    pGetAwarenessFromDpiAwarenessContext = (DPI_AWARENESS (WINAPI *)(DPI_AWARENESS_CONTEXT))GetProcAddress(hUser32, "GetAwarenessFromDpiAwarenessContext");
 
     if (pSetThreadDpiAwarenessContext != NULL)
     {
@@ -7799,8 +7800,9 @@ initialise_toolbar(void)
 update_toolbar_size(void)
 {
     int                w, h;
-    TBMETRICS  tbm = {sizeof(TBMETRICS)};
+    TBMETRICS  tbm;
 
+    tbm.cbSize = sizeof(TBMETRICS);
     tbm.dwMask = TBMF_PAD | TBMF_BUTTONSPACING;
     SendMessage(s_toolbarhwnd, TB_GETMETRICS, 0, (LPARAM)&tbm);
     //TRACE("Pad: %d, %d", tbm.cxPad, tbm.cyPad);
@@ -8043,27 +8045,27 @@ dyn_imm_load(void)
        return;
 
     pImmGetCompositionStringW
-           = (void *)GetProcAddress(hLibImm, "ImmGetCompositionStringW");
+           = (LONG (WINAPI *)(HIMC, DWORD, LPVOID, DWORD))GetProcAddress(hLibImm, "ImmGetCompositionStringW");
     pImmGetContext
-           = (void *)GetProcAddress(hLibImm, "ImmGetContext");
+           = (HIMC (WINAPI *)(HWND))GetProcAddress(hLibImm, "ImmGetContext");
     pImmAssociateContext
-           = (void *)GetProcAddress(hLibImm, "ImmAssociateContext");
+           = (HIMC (WINAPI *)(HWND, HIMC))GetProcAddress(hLibImm, "ImmAssociateContext");
     pImmReleaseContext
-           = (void *)GetProcAddress(hLibImm, "ImmReleaseContext");
+           = (BOOL (WINAPI *)(HWND, HIMC))GetProcAddress(hLibImm, "ImmReleaseContext");
     pImmGetOpenStatus
-           = (void *)GetProcAddress(hLibImm, "ImmGetOpenStatus");
+           = (BOOL (WINAPI *)(HIMC))GetProcAddress(hLibImm, "ImmGetOpenStatus");
     pImmSetOpenStatus
-           = (void *)GetProcAddress(hLibImm, "ImmSetOpenStatus");
+           = (BOOL (WINAPI *)(HIMC, BOOL))GetProcAddress(hLibImm, "ImmSetOpenStatus");
     pImmGetCompositionFontW
-           = (void *)GetProcAddress(hLibImm, "ImmGetCompositionFontW");
+           = (BOOL (WINAPI *)(HIMC, LPLOGFONTW))GetProcAddress(hLibImm, "ImmGetCompositionFontW");
     pImmSetCompositionFontW
-           = (void *)GetProcAddress(hLibImm, "ImmSetCompositionFontW");
+           = (BOOL (WINAPI *)(HIMC, LPLOGFONTW))GetProcAddress(hLibImm, "ImmSetCompositionFontW");
     pImmSetCompositionWindow
-           = (void *)GetProcAddress(hLibImm, "ImmSetCompositionWindow");
+           = (BOOL (WINAPI *)(HIMC, LPCOMPOSITIONFORM))GetProcAddress(hLibImm, "ImmSetCompositionWindow");
     pImmGetConversionStatus
-           = (void *)GetProcAddress(hLibImm, "ImmGetConversionStatus");
+           = (BOOL (WINAPI *)(HIMC, LPDWORD, LPDWORD))GetProcAddress(hLibImm, "ImmGetConversionStatus");
     pImmSetConversionStatus
-           = (void *)GetProcAddress(hLibImm, "ImmSetConversionStatus");
+           = (BOOL (WINAPI *)(HIMC, DWORD, DWORD))GetProcAddress(hLibImm, "ImmSetConversionStatus");
 
     if (       pImmGetCompositionStringW == NULL
            || pImmGetContext == NULL
index 73d5143abc8e4922d4cf13ba2c5d8aa0b1442b1f..9dded854859d7f173dc69ea4666c222458b2b079 100644 (file)
 # endif
 #endif // USE_FILEEXTD
 
+#ifdef __MINGW32__
+# define UNUSED __attribute__((unused))
+#else
+# define UNUSED
+#endif
 
 #include "iscygpty.h"
 
@@ -70,10 +75,10 @@ static pfnGetFileInformationByHandleEx pGetFileInformationByHandleEx = NULL;
 
 # ifndef USE_FILEEXTD
 static BOOL WINAPI stub_GetFileInformationByHandleEx(
-               HANDLE                                          hFile,
-               FILE_INFO_BY_HANDLE_CLASS       FileInformationClass,
-               LPVOID                                          lpFileInformation,
-               DWORD                                           dwBufferSize)
+               HANDLE                                          hFile UNUSED,
+               FILE_INFO_BY_HANDLE_CLASS       FileInformationClass UNUSED,
+               LPVOID                                          lpFileInformation UNUSED,
+               DWORD                                           dwBufferSize UNUSED)
 {
        return FALSE;
 }
index c4e408a37d2aafaa0945b61e2e0bd2c61b76516b..23f54b92eb4faf207fdce1b930b145839c7d5a77 100644 (file)
@@ -7,9 +7,13 @@
 
 #if defined(__GNUC__) && !defined(__MINGW32__)
 # define INTERNAL __attribute__((visibility("internal")))
-# define UNUSED __attribute__((unused))
 #else
 # define INTERNAL
+#endif
+
+#if defined(__GNUC__) || defined(__MINGW32__)
+# define UNUSED __attribute__((unused))
+#else
 # define UNUSED
 #endif
 
index a01a05140207477974bc52573a8b10d94970b97c..3656880e23f815d7a2c79c3eba6549bb939be995 100644 (file)
@@ -4922,13 +4922,18 @@ iconv_enabled(int verbose)
        return FALSE;
     }
 
-    iconv      = (void *)GetProcAddress(hIconvDLL, "libiconv");
-    iconv_open = (void *)GetProcAddress(hIconvDLL, "libiconv_open");
-    iconv_close        = (void *)GetProcAddress(hIconvDLL, "libiconv_close");
-    iconvctl   = (void *)GetProcAddress(hIconvDLL, "libiconvctl");
-    iconv_errno        = get_dll_import_func(hIconvDLL, "_errno");
+    iconv      = (size_t (*)(iconv_t, const char **,
+                       size_t *, char **, size_t *))
+                               GetProcAddress(hIconvDLL, "libiconv");
+    iconv_open = (iconv_t (*)(const char *, const char *))
+                               GetProcAddress(hIconvDLL, "libiconv_open");
+    iconv_close        = (int (*)(iconv_t))
+                               GetProcAddress(hIconvDLL, "libiconv_close");
+    iconvctl   = (int (*)(iconv_t, int, void *))
+                               GetProcAddress(hIconvDLL, "libiconvctl");
+    iconv_errno        = (int *(*)(void))get_dll_import_func(hIconvDLL, "_errno");
     if (iconv_errno == NULL)
-       iconv_errno = (void *)GetProcAddress(hMsvcrtDLL, "_errno");
+       iconv_errno = (int *(*)(void))GetProcAddress(hMsvcrtDLL, "_errno");
     if (iconv == NULL || iconv_open == NULL || iconv_close == NULL
            || iconvctl == NULL || iconv_errno == NULL)
     {
index 300045b3f9bd74816935cf3c1d5bdfbba1785bfa..07befb8f2a78000e94799777365a4987f084f620 100644 (file)
@@ -273,11 +273,12 @@ typedef BOOL (WINAPI *PfnRtlGetVersion)(LPOSVERSIONINFOW);
     static DWORD
 get_build_number(void)
 {
-    OSVERSIONINFOW     osver = {sizeof(OSVERSIONINFOW)};
+    OSVERSIONINFOW     osver;
     HMODULE            hNtdll;
     PfnRtlGetVersion   pRtlGetVersion;
     DWORD              ver = MAKE_VER(0, 0, 0);
 
+    osver.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
     hNtdll = GetModuleHandle("ntdll.dll");
     if (hNtdll != NULL)
     {
@@ -325,7 +326,7 @@ make_ambiwidth_event(
 read_console_input(
     HANDLE         hInput,
     INPUT_RECORD    *lpBuffer,
-    DWORD          nLength,
+    int                    nLength,
     LPDWORD        lpEvents)
 {
     enum
@@ -423,7 +424,7 @@ peek_console_input(
     DWORD          nLength UNUSED,
     LPDWORD        lpEvents)
 {
-    return read_console_input(hInput, lpBuffer, (DWORD)-1, lpEvents);
+    return read_console_input(hInput, lpBuffer, -1, lpEvents);
 }
 
 # ifdef FEAT_CLIENTSERVER
@@ -435,7 +436,7 @@ msg_wait_for_multiple_objects(
     DWORD    dwMilliseconds,
     DWORD    dwWakeMask)
 {
-    if (read_console_input(NULL, NULL, (DWORD)-2, NULL))
+    if (read_console_input(NULL, NULL, -2, NULL))
        return WAIT_OBJECT_0;
     return MsgWaitForMultipleObjects(nCount, pHandles, fWaitAll,
                                     dwMilliseconds, dwWakeMask);
@@ -448,7 +449,7 @@ wait_for_single_object(
     HANDLE hHandle,
     DWORD dwMilliseconds)
 {
-    if (read_console_input(NULL, NULL, (DWORD)-2, NULL))
+    if (read_console_input(NULL, NULL, -2, NULL))
        return WAIT_OBJECT_0;
     return WaitForSingleObject(hHandle, dwMilliseconds);
 }
@@ -760,8 +761,8 @@ dyn_libintl_init(void)
     }
 
     // The bind_textdomain_codeset() function is optional.
-    dyn_libintl_bind_textdomain_codeset = (void *)GetProcAddress(hLibintlDLL,
-                                                  "bind_textdomain_codeset");
+    dyn_libintl_bind_textdomain_codeset = (char *(*)(const char *, const char *))
+                       GetProcAddress(hLibintlDLL, "bind_textdomain_codeset");
     if (dyn_libintl_bind_textdomain_codeset == NULL)
        dyn_libintl_bind_textdomain_codeset =
                                         null_libintl_bind_textdomain_codeset;
@@ -769,7 +770,8 @@ dyn_libintl_init(void)
     // _wputenv() function for the libintl.dll is optional.
     hmsvcrt = find_imported_module_by_funcname(hLibintlDLL, "getenv");
     if (hmsvcrt != NULL)
-       dyn_libintl_wputenv = (void *)GetProcAddress(hmsvcrt, "_wputenv");
+       dyn_libintl_wputenv = (int (*)(const wchar_t *))
+                                       GetProcAddress(hmsvcrt, "_wputenv");
     if (dyn_libintl_wputenv == NULL || dyn_libintl_wputenv == _wputenv)
        dyn_libintl_wputenv = null_libintl_wputenv;
 
@@ -4224,7 +4226,7 @@ sub_process_writer(LPVOID param)
                      s == NULL ? l : (DWORD)(s - (lp + written)),
                      &len, NULL);
        }
-       if (len == (int)l)
+       if (len == l)
        {
            // Finished a line, add a NL, unless this line should not have
            // one.
@@ -8338,7 +8340,7 @@ static int      *timeout_flag = &timeout_flags[0];
 
 
     static void CALLBACK
-set_flag(void *param, BOOLEAN unused2)
+set_flag(void *param, BOOLEAN unused2 UNUSED)
 {
     int *timeout_flag = (int *)param;
 
index a98951e3dfc91339fc82d6cc12ca0b99b323dd2e..3cc0f472a5a82a9b8ba4361cb07d7b95aabcc758 100644 (file)
@@ -198,7 +198,7 @@ Trace(char *pszFormat, ...);
 
   // These macros should all compile away to nothing
 # define ASSERT(f)             ((void)0)
-# define TRACE                 1 ? (void)0 : printf
+# define TRACE                 1 ? (void)0 : (void)printf
 # define TRACE0(sz)
 # define TRACE1(sz, p1)
 # define TRACE2(sz, p1, p2)
index 96a81800a144f0ca89e76e92adbae8b11fbce8da..9e26eabb796fea02d434d2ad2299e9607bef7e4a 100644 (file)
 
 #undef tgetstr
 
-/*
- * Here are the builtin termcap entries.  They are not stored as complete
- * structures with all entries, as such a structure is too big.
- *
- * The entries are compact, therefore they normally are included even when
- * HAVE_TGETENT is defined. When HAVE_TGETENT is defined, the builtin entries
- * can be accessed with "builtin_amiga", "builtin_ansi", "builtin_debug", etc.
- *
- * Each termcap is a list of builtin_term structures. It always starts with
- * KS_NAME, which separates the entries.  See parse_builtin_tcap() for all
- * details.
- * bt_entry is either a KS_xxx code (>= 0), or a K_xxx code.
- *
- * Entries marked with "guessed" may be wrong.
- */
 struct builtin_term
 {
     int                bt_entry;
@@ -221,6 +206,21 @@ static int initial_cursor_shape_blink = FALSE;
 static int initial_cursor_blink = FALSE;
 #endif
 
+/*
+ * Here are the builtin termcap entries.  They are not stored as complete
+ * structures with all entries to save space.
+ *
+ * The entries are also included even when HAVE_TGETENT is defined, the systerm
+ * termcap may be incomplee.  When HAVE_TGETENT is defined, the builtin entries
+ * can be accessed with "builtin_amiga", "builtin_ansi", "builtin_debug", etc.
+ *
+ * Each termcap is a list of builtin_term structures. It always starts with
+ * KS_NAME, which separates the entries.  See parse_builtin_tcap() for all
+ * details.
+ * bt_entry is either a KS_xxx code (>= 0), or a K_xxx code.
+ *
+ * Entries marked with "guessed" may be wrong.
+ */
 static struct builtin_term builtin_termcaps[] =
 {
 
@@ -6603,28 +6603,28 @@ struct ks_tbl_S
 
 static struct ks_tbl_S ks_tbl[] =
 {
-    {(int)KS_ME,  "\033|0m",  "\033|0m"},   // normal
-    {(int)KS_MR,  "\033|7m",  "\033|7m"},   // reverse
-    {(int)KS_MD,  "\033|1m",  "\033|1m"},   // bold
-    {(int)KS_SO,  "\033|91m", "\033|91m"},  // standout: bright red text
-    {(int)KS_SE,  "\033|39m", "\033|39m"},  // standout end: default color
-    {(int)KS_CZH, "\033|3m",  "\033|3m"},   // italic
-    {(int)KS_CZR, "\033|0m",  "\033|0m"},   // italic end
-    {(int)KS_US,  "\033|4m",  "\033|4m"},   // underscore
-    {(int)KS_UE,  "\033|24m", "\033|24m"},  // underscore end
+    {(int)KS_ME,  "\033|0m",  "\033|0m", {""}},   // normal
+    {(int)KS_MR,  "\033|7m",  "\033|7m", {""}},   // reverse
+    {(int)KS_MD,  "\033|1m",  "\033|1m", {""}},   // bold
+    {(int)KS_SO,  "\033|91m", "\033|91m", {""}},  // standout: bright red text
+    {(int)KS_SE,  "\033|39m", "\033|39m", {""}},  // standout end: default color
+    {(int)KS_CZH, "\033|3m",  "\033|3m", {""}},   // italic
+    {(int)KS_CZR, "\033|0m",  "\033|0m", {""}},   // italic end
+    {(int)KS_US,  "\033|4m",  "\033|4m", {""}},   // underscore
+    {(int)KS_UE,  "\033|24m", "\033|24m", {""}},  // underscore end
 #  ifdef TERMINFO
-    {(int)KS_CAB, "\033|%p1%db", "\033|%p14%dm"}, // set background color
-    {(int)KS_CAF, "\033|%p1%df", "\033|%p13%dm"}, // set foreground color
-    {(int)KS_CS,  "\033|%p1%d;%p2%dR", "\033|%p1%d;%p2%dR"},
-    {(int)KS_CSV, "\033|%p1%d;%p2%dV", "\033|%p1%d;%p2%dV"},
+    {(int)KS_CAB, "\033|%p1%db", "\033|%p14%dm", {""}}, // set background color
+    {(int)KS_CAF, "\033|%p1%df", "\033|%p13%dm", {""}}, // set foreground color
+    {(int)KS_CS,  "\033|%p1%d;%p2%dR", "\033|%p1%d;%p2%dR", {""}},
+    {(int)KS_CSV, "\033|%p1%d;%p2%dV", "\033|%p1%d;%p2%dV", {""}},
 #  else
-    {(int)KS_CAB, "\033|%db", "\033|4%dm"}, // set background color
-    {(int)KS_CAF, "\033|%df", "\033|3%dm"}, // set foreground color
-    {(int)KS_CS,  "\033|%d;%dR", "\033|%d;%dR"},
-    {(int)KS_CSV, "\033|%d;%dV", "\033|%d;%dV"},
+    {(int)KS_CAB, "\033|%db", "\033|4%dm", {""}}, // set background color
+    {(int)KS_CAF, "\033|%df", "\033|3%dm", {""}}, // set foreground color
+    {(int)KS_CS,  "\033|%d;%dR", "\033|%d;%dR", {""}},
+    {(int)KS_CSV, "\033|%d;%dV", "\033|%d;%dV", {""}},
 #  endif
-    {(int)KS_CCO, "256", "256"},           // colors
-    {(int)KS_NAME}                         // terminator
+    {(int)KS_CCO, "256", "256", {""}},     // colors
+    {(int)KS_NAME, NULL, NULL, {""}}                       // terminator
 };
 
     static struct builtin_term *
index 8f5a4ff71b607dd0c2093f563ce3cae6502c42e1..092d563446da5aa704247a8b20244966b6a92d60 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    5073,
 /**/
     5072,
 /**/
index 21ae35ed70c6174eacbaf9be9d4b00c913f6b173..6e9f50a2d08b5129ea5d57b89b13be7378cabbbf 100644 (file)
@@ -33,7 +33,7 @@
 
 // Mark unused function arguments with UNUSED, so that gcc -Wunused-parameter
 // can be used to check for mistakes.
-#ifdef HAVE_ATTRIBUTE_UNUSED
+#if defined(HAVE_ATTRIBUTE_UNUSED) || defined(__MINGW32__)
 # define UNUSED __attribute__((unused))
 #else
 # define UNUSED