Skip to content

Commit 9e17514

Browse files
committed
patch 8.2.0671: Haiku: compiler warnings
Problem: Haiku: compiler warnings. Solution: Avoid the warnings. Drop display_errors() copy. (Emir Sari, closes #6018)
1 parent 6adb9ea commit 9e17514

4 files changed

Lines changed: 6 additions & 36 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ src/xxd/xxd
55
src/auto/if_perl.c
66
src/auto/gui_gtk_gresources.c
77
src/auto/gui_gtk_gresources.h
8+
src/auto/os_haiku.rdef
89
src/objects/.dirstamp
910
src/objects
1011
src/tags

src/gui.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5107,7 +5107,8 @@ gui_find_iconfile(char_u *name, char_u *buffer, char *ext)
51075107
# endif
51085108
#endif
51095109

5110-
#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11) || defined(PROTO)
5110+
#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11)|| defined(FEAT_GUI_HAIKU) \
5111+
|| defined(PROTO)
51115112
void
51125113
display_errors(void)
51135114
{

src/gui_haiku.cc

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ struct VimMsg {
551551
};
552552

553553
#define RGB(r, g, b) ((char_u)(r) << 16 | (char_u)(g) << 8 | (char_u)(b) << 0)
554-
#define GUI_TO_RGB(g) { (g) >> 16, (g) >> 8, (g) >> 0, 255 }
554+
#define GUI_TO_RGB(g) { (char_u)((g) >> 16), (char_u)((g) >> 8), (char_u)((g) >> 0), 255 }
555555

556556
// ---------------- end of header part ----------------
557557

@@ -3990,40 +3990,6 @@ gui_mch_adjust_charheight()
39903990
return OK;
39913991
}
39923992

3993-
/*
3994-
* Display the saved error message(s).
3995-
*/
3996-
#ifdef USE_MCH_ERRMSG
3997-
void
3998-
display_errors(void)
3999-
{
4000-
char *p;
4001-
char_u pError[256];
4002-
4003-
if (error_ga.ga_data == NULL)
4004-
return;
4005-
4006-
// avoid putting up a message box with blanks only
4007-
for (p = (char *)error_ga.ga_data; *p; ++p)
4008-
if (!isspace(*p))
4009-
{
4010-
if (STRLEN(p) > 255)
4011-
pError[0] = 255;
4012-
else
4013-
pError[0] = STRLEN(p);
4014-
4015-
STRNCPY(&pError[1], p, pError[0]);
4016-
// ParamText(pError, nil, nil, nil);
4017-
// Alert(128, nil);
4018-
break;
4019-
// TODO: handled message longer than 256 chars
4020-
// use auto-sizeable alert
4021-
// or dialog with scrollbars (TextEdit zone)
4022-
}
4023-
ga_clear(&error_ga);
4024-
}
4025-
#endif
4026-
40273993
void
40283994
gui_mch_getmouse(int *x, int *y)
40293995
{

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,8 @@ static char *(features[]) =
746746

747747
static int included_patches[] =
748748
{ /* Add new patch number below this line */
749+
/**/
750+
671,
749751
/**/
750752
670,
751753
/**/

0 commit comments

Comments
 (0)