diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-08-22 23:04:33 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-08-22 23:04:33 +0200 |
commit | 1b58cdd160c2e0ada0f638679a2aa27e4665fc48 (patch) | |
tree | 5a88e5a7aec9e04bc428c6a9e468cb2fc7ae2edb /src/syntax.c | |
parent | 17f1347b867cbcc0ce380bf9a2466b4c31896f04 (diff) | |
download | vim-git-1b58cdd160c2e0ada0f638679a2aa27e4665fc48.tar.gz |
patch 7.4.2243v7.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.
Diffstat (limited to 'src/syntax.c')
-rw-r--r-- | src/syntax.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/syntax.c b/src/syntax.c index ff8cbb431..f8be5e36e 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -8488,7 +8488,7 @@ color_name2handle(char_u *name) return gui.norm_pixel; #endif #ifdef FEAT_TERMGUICOLORS - if (cterm_normal_fg_gui_color != (long_u)INVALCOLOR) + if (cterm_normal_fg_gui_color != INVALCOLOR) return cterm_normal_fg_gui_color; /* Guess that the foreground is black or white. */ return GUI_GET_COLOR((char_u *)(*p_bg == 'l' ? "black" : "white")); @@ -8503,7 +8503,7 @@ color_name2handle(char_u *name) return gui.back_pixel; #endif #ifdef FEAT_TERMGUICOLORS - if (cterm_normal_bg_gui_color != (long_u)INVALCOLOR) + if (cterm_normal_bg_gui_color != INVALCOLOR) return cterm_normal_bg_gui_color; /* Guess that the background is white or black. */ return GUI_GET_COLOR((char_u *)(*p_bg == 'l' ? "white" : "black")); @@ -8782,9 +8782,9 @@ hl_combine_attr(int char_attr, int prim_attr) if (spell_aep->ae_u.cterm.bg_color > 0) new_en.ae_u.cterm.bg_color = spell_aep->ae_u.cterm.bg_color; #ifdef FEAT_TERMGUICOLORS - if (spell_aep->ae_u.cterm.fg_rgb != (long_u)INVALCOLOR) + if (spell_aep->ae_u.cterm.fg_rgb != INVALCOLOR) new_en.ae_u.cterm.fg_rgb = spell_aep->ae_u.cterm.fg_rgb; - if (spell_aep->ae_u.cterm.bg_rgb != (long_u)INVALCOLOR) + if (spell_aep->ae_u.cterm.bg_rgb != INVALCOLOR) new_en.ae_u.cterm.bg_rgb = spell_aep->ae_u.cterm.bg_rgb; #endif } @@ -9076,7 +9076,7 @@ highlight_color( color = HL_TABLE()[id - 1].sg_gui_bg; if (color == INVALCOLOR) return NULL; - rgb = GUI_MCH_GET_RGB(color); + rgb = (long_u)GUI_MCH_GET_RGB(color); sprintf((char *)buf, "#%02x%02x%02x", (unsigned)(rgb >> 16), (unsigned)(rgb >> 8) & 255, |