summaryrefslogtreecommitdiffstats
path: root/src/gui.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-08-22 23:04:33 +0200
committerBram Moolenaar <Bram@vim.org>2016-08-22 23:04:33 +0200
commit1b58cdd160c2e0ada0f638679a2aa27e4665fc48 (patch)
tree5a88e5a7aec9e04bc428c6a9e468cb2fc7ae2edb /src/gui.c
parent17f1347b867cbcc0ce380bf9a2466b4c31896f04 (diff)
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/gui.c')
-rw-r--r--src/gui.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui.c b/src/gui.c
index 6f1d8f51b7..31ddd036cf 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -4741,7 +4741,7 @@ gui_get_color(char_u *name)
int
gui_get_lightness(guicolor_T pixel)
{
- long_u rgb = gui_mch_get_rgb(pixel);
+ long_u rgb = (long_u)gui_mch_get_rgb(pixel);
return (int)( (((rgb >> 16) & 0xff) * 299)
+ (((rgb >> 8) & 0xff) * 587)