1
0
forked from aniani/vim

patch 8.0.1709: some non-C89 code may slip through

Problem:    Some non-C89 code may slip through.
Solution:   Enforce C89 in configure. Fix detected problems. (James McCoy,
            closes #2735)
This commit is contained in:
Bram Moolenaar
2018-04-14 14:37:07 +02:00
parent 78a16b0f2a
commit 2e324950b8
6 changed files with 122 additions and 12 deletions

View File

@@ -5607,15 +5607,17 @@ gui_mch_free_font(GuiFont font)
guicolor_T
gui_mch_get_color(char_u *name)
{
guicolor_T color = INVALCOLOR;
if (!gui.in_use) /* can't do this when GUI not running */
return INVALCOLOR;
return color;
if (name != NULL)
color = gui_get_color_cmn(name);
#if GTK_CHECK_VERSION(3,0,0)
return name != NULL ? gui_get_color_cmn(name) : INVALCOLOR;
return color;
#else
guicolor_T color;
color = (name != NULL) ? gui_get_color_cmn(name) : INVALCOLOR;
if (color == INVALCOLOR)
return INVALCOLOR;