]> granicus.if.org Git - vim/commitdiff
patch 8.2.0671: Haiku: compiler warnings v8.2.0671
authorBram Moolenaar <Bram@vim.org>
Thu, 30 Apr 2020 20:51:01 +0000 (22:51 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 30 Apr 2020 20:51:01 +0000 (22:51 +0200)
Problem:    Haiku: compiler warnings.
Solution:   Avoid the warnings. Drop display_errors() copy. (Emir Sari,
            closes #6018)

.gitignore
src/gui.c
src/gui_haiku.cc
src/version.c

index 2dc119476cb642a95a371e375a4ac21a33fbf3e9..8623fdebf0db480e4d04627f233c8615dee5b838 100644 (file)
@@ -5,6 +5,7 @@ src/xxd/xxd
 src/auto/if_perl.c
 src/auto/gui_gtk_gresources.c
 src/auto/gui_gtk_gresources.h
+src/auto/os_haiku.rdef
 src/objects/.dirstamp
 src/objects
 src/tags
index 5959043279b946ca40de2bdfeb3208aea4bb0d89..13b65cb03c5f78a8443de25cb3333798e5d8f3d7 100644 (file)
--- a/src/gui.c
+++ b/src/gui.c
@@ -5107,7 +5107,8 @@ gui_find_iconfile(char_u *name, char_u *buffer, char *ext)
 # endif
 #endif
 
-#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11) || defined(PROTO)
+#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11)|| defined(FEAT_GUI_HAIKU) \
+       || defined(PROTO)
     void
 display_errors(void)
 {
index 2dbd852f2795c22df58322234f2a42fc72b04db9..ff460adf29b9cfb45f3a465f3347d83d0f9611d3 100644 (file)
@@ -551,7 +551,7 @@ struct VimMsg {
 };
 
 #define RGB(r, g, b)   ((char_u)(r) << 16 | (char_u)(g) << 8 | (char_u)(b) << 0)
-#define GUI_TO_RGB(g)  { (g) >> 16, (g) >> 8, (g) >> 0, 255 }
+#define GUI_TO_RGB(g)  { (char_u)((g) >> 16), (char_u)((g) >> 8), (char_u)((g) >> 0), 255 }
 
 // ---------------- end of header part ----------------
 
@@ -3990,40 +3990,6 @@ gui_mch_adjust_charheight()
     return OK;
 }
 
-/*
- * Display the saved error message(s).
- */
-#ifdef USE_MCH_ERRMSG
-    void
-display_errors(void)
-{
-    char    *p;
-    char_u  pError[256];
-
-    if (error_ga.ga_data == NULL)
-    return;
-
-    // avoid putting up a message box with blanks only
-    for (p = (char *)error_ga.ga_data; *p; ++p)
-    if (!isspace(*p))
-    {
-       if (STRLEN(p) > 255)
-       pError[0] = 255;
-       else
-       pError[0] = STRLEN(p);
-
-       STRNCPY(&pError[1], p, pError[0]);
-//     ParamText(pError, nil, nil, nil);
-//     Alert(128, nil);
-       break;
-       // TODO: handled message longer than 256 chars
-       //   use auto-sizeable alert
-       //   or dialog with scrollbars (TextEdit zone)
-    }
-    ga_clear(&error_ga);
-}
-#endif
-
     void
 gui_mch_getmouse(int *x, int *y)
 {
index 8b9fec5516437d532103eb4c347a22646216b655..5e35da8a08b154a1617f0492281caeb103d48dcc 100644 (file)
@@ -746,6 +746,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    671,
 /**/
     670,
 /**/