From 1b58cdd160c2e0ada0f638679a2aa27e4665fc48 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 22 Aug 2016 23:04:33 +0200 Subject: 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. --- src/gui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui.c') diff --git a/src/gui.c b/src/gui.c index 6f1d8f51b..31ddd036c 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) -- cgit v1.2.1