mirror of
https://github.com/vim/vim.git
synced 2025-10-02 05:04:20 -04:00
patch 7.4.2243
Problem: Warning for assigning negative value to unsigned. (Danek Duvall) Solution: Make cterm_normal_fg_gui_color and _bg_ guicolor_T, cast to long_u only when an unsigned is needed.
This commit is contained in:
23
src/screen.c
23
src/screen.c
@@ -7865,7 +7865,7 @@ screen_start_highlight(int attr)
|
||||
else if (aep != NULL && cterm_normal_fg_bold &&
|
||||
#ifdef FEAT_TERMGUICOLORS
|
||||
(p_tgc ?
|
||||
(aep->ae_u.cterm.fg_rgb != (long_u)INVALCOLOR):
|
||||
(aep->ae_u.cterm.fg_rgb != INVALCOLOR):
|
||||
#endif
|
||||
(t_colors > 1 && aep->ae_u.cterm.fg_color)
|
||||
#ifdef FEAT_TERMGUICOLORS
|
||||
@@ -7894,9 +7894,9 @@ screen_start_highlight(int attr)
|
||||
#ifdef FEAT_TERMGUICOLORS
|
||||
if (p_tgc)
|
||||
{
|
||||
if (aep->ae_u.cterm.fg_rgb != (long_u)INVALCOLOR)
|
||||
if (aep->ae_u.cterm.fg_rgb != INVALCOLOR)
|
||||
term_fg_rgb_color(aep->ae_u.cterm.fg_rgb);
|
||||
if (aep->ae_u.cterm.bg_rgb != (long_u)INVALCOLOR)
|
||||
if (aep->ae_u.cterm.bg_rgb != INVALCOLOR)
|
||||
term_bg_rgb_color(aep->ae_u.cterm.bg_rgb);
|
||||
}
|
||||
else
|
||||
@@ -7956,8 +7956,8 @@ screen_stop_highlight(void)
|
||||
if (aep != NULL &&
|
||||
#ifdef FEAT_TERMGUICOLORS
|
||||
(p_tgc ?
|
||||
(aep->ae_u.cterm.fg_rgb != (long_u)INVALCOLOR ||
|
||||
aep->ae_u.cterm.bg_rgb != (long_u)INVALCOLOR):
|
||||
(aep->ae_u.cterm.fg_rgb != INVALCOLOR
|
||||
|| aep->ae_u.cterm.bg_rgb != INVALCOLOR):
|
||||
#endif
|
||||
(aep->ae_u.cterm.fg_color || aep->ae_u.cterm.bg_color)
|
||||
#ifdef FEAT_TERMGUICOLORS
|
||||
@@ -8014,9 +8014,9 @@ screen_stop_highlight(void)
|
||||
#ifdef FEAT_TERMGUICOLORS
|
||||
if (p_tgc)
|
||||
{
|
||||
if (cterm_normal_fg_gui_color != (long_u)INVALCOLOR)
|
||||
if (cterm_normal_fg_gui_color != INVALCOLOR)
|
||||
term_fg_rgb_color(cterm_normal_fg_gui_color);
|
||||
if (cterm_normal_bg_gui_color != (long_u)INVALCOLOR)
|
||||
if (cterm_normal_bg_gui_color != INVALCOLOR)
|
||||
term_bg_rgb_color(cterm_normal_bg_gui_color);
|
||||
}
|
||||
else
|
||||
@@ -8049,10 +8049,9 @@ reset_cterm_colors(void)
|
||||
{
|
||||
/* set Normal cterm colors */
|
||||
#ifdef FEAT_TERMGUICOLORS
|
||||
if (p_tgc ?
|
||||
(cterm_normal_fg_gui_color != (long_u)INVALCOLOR
|
||||
|| cterm_normal_bg_gui_color != (long_u)INVALCOLOR):
|
||||
(cterm_normal_fg_color > 0 || cterm_normal_bg_color > 0))
|
||||
if (p_tgc ? (cterm_normal_fg_gui_color != INVALCOLOR
|
||||
|| cterm_normal_bg_gui_color != INVALCOLOR)
|
||||
: (cterm_normal_fg_color > 0 || cterm_normal_bg_color > 0))
|
||||
#else
|
||||
if (cterm_normal_fg_color > 0 || cterm_normal_bg_color > 0)
|
||||
#endif
|
||||
@@ -8983,7 +8982,7 @@ can_clear(char_u *p)
|
||||
|| gui.in_use
|
||||
#endif
|
||||
#ifdef FEAT_TERMGUICOLORS
|
||||
|| (p_tgc && cterm_normal_bg_gui_color == (long_u)INVALCOLOR)
|
||||
|| (p_tgc && cterm_normal_bg_gui_color == INVALCOLOR)
|
||||
|| (!p_tgc && cterm_normal_bg_color == 0)
|
||||
#else
|
||||
|| cterm_normal_bg_color == 0
|
||||
|
Reference in New Issue
Block a user