0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -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:
Bram Moolenaar
2016-08-22 23:04:33 +02:00
parent 17f1347b86
commit 1b58cdd160
18 changed files with 66 additions and 66 deletions

View File

@@ -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)