To: vim_dev@googlegroups.com Subject: Patch 7.4.1774 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1774 (after 7.4.1770) Problem: Cterm true color feature has warnings. Solution: Add type casts. Files: src/screen.c, src/syntax.c, src/term.c *** ../vim-7.4.1773/src/screen.c 2016-04-21 21:08:11.793948968 +0200 --- src/screen.c 2016-04-22 11:47:10.778524303 +0200 *************** *** 7842,7848 **** else if (aep != NULL && cterm_normal_fg_bold && #ifdef FEAT_TERMTRUECOLOR (p_guicolors ? ! (aep->ae_u.cterm.fg_rgb != INVALCOLOR): #endif (t_colors > 1 && aep->ae_u.cterm.fg_color) #ifdef FEAT_TERMTRUECOLOR --- 7842,7848 ---- else if (aep != NULL && cterm_normal_fg_bold && #ifdef FEAT_TERMTRUECOLOR (p_guicolors ? ! (aep->ae_u.cterm.fg_rgb != (long_u)INVALCOLOR): #endif (t_colors > 1 && aep->ae_u.cterm.fg_color) #ifdef FEAT_TERMTRUECOLOR *************** *** 7871,7879 **** #ifdef FEAT_TERMTRUECOLOR if (p_guicolors) { ! if (aep->ae_u.cterm.fg_rgb != INVALCOLOR) term_fg_rgb_color(aep->ae_u.cterm.fg_rgb); ! if (aep->ae_u.cterm.bg_rgb != INVALCOLOR) term_bg_rgb_color(aep->ae_u.cterm.bg_rgb); } else --- 7871,7879 ---- #ifdef FEAT_TERMTRUECOLOR if (p_guicolors) { ! if (aep->ae_u.cterm.fg_rgb != (long_u)INVALCOLOR) term_fg_rgb_color(aep->ae_u.cterm.fg_rgb); ! if (aep->ae_u.cterm.bg_rgb != (long_u)INVALCOLOR) term_bg_rgb_color(aep->ae_u.cterm.bg_rgb); } else *************** *** 7933,7940 **** if (aep != NULL && #ifdef FEAT_TERMTRUECOLOR (p_guicolors ? ! (aep->ae_u.cterm.fg_rgb != INVALCOLOR || ! aep->ae_u.cterm.bg_rgb != INVALCOLOR): #endif (aep->ae_u.cterm.fg_color || aep->ae_u.cterm.bg_color) #ifdef FEAT_TERMTRUECOLOR --- 7933,7940 ---- if (aep != NULL && #ifdef FEAT_TERMTRUECOLOR (p_guicolors ? ! (aep->ae_u.cterm.fg_rgb != (long_u)INVALCOLOR || ! aep->ae_u.cterm.bg_rgb != (long_u)INVALCOLOR): #endif (aep->ae_u.cterm.fg_color || aep->ae_u.cterm.bg_color) #ifdef FEAT_TERMTRUECOLOR *************** *** 7991,7999 **** #ifdef FEAT_TERMTRUECOLOR if (p_guicolors) { ! if (cterm_normal_fg_gui_color != INVALCOLOR) term_fg_rgb_color(cterm_normal_fg_gui_color); ! if (cterm_normal_bg_gui_color != INVALCOLOR) term_bg_rgb_color(cterm_normal_bg_gui_color); } else --- 7991,7999 ---- #ifdef FEAT_TERMTRUECOLOR if (p_guicolors) { ! if (cterm_normal_fg_gui_color != (long_u)INVALCOLOR) term_fg_rgb_color(cterm_normal_fg_gui_color); ! if (cterm_normal_bg_gui_color != (long_u)INVALCOLOR) term_bg_rgb_color(cterm_normal_bg_gui_color); } else *************** *** 8027,8034 **** /* set Normal cterm colors */ #ifdef FEAT_TERMTRUECOLOR if (p_guicolors ? ! (cterm_normal_fg_gui_color != INVALCOLOR ! || cterm_normal_bg_gui_color != INVALCOLOR): (cterm_normal_fg_color > 0 || cterm_normal_bg_color > 0)) #else if (cterm_normal_fg_color > 0 || cterm_normal_bg_color > 0) --- 8027,8034 ---- /* set Normal cterm colors */ #ifdef FEAT_TERMTRUECOLOR if (p_guicolors ? ! (cterm_normal_fg_gui_color != (long_u)INVALCOLOR ! || cterm_normal_bg_gui_color != (long_u)INVALCOLOR): (cterm_normal_fg_color > 0 || cterm_normal_bg_color > 0)) #else if (cterm_normal_fg_color > 0 || cterm_normal_bg_color > 0) *************** *** 8960,8966 **** || gui.in_use #endif #ifdef FEAT_TERMTRUECOLOR ! || (p_guicolors && cterm_normal_bg_gui_color != INVALCOLOR) #endif || cterm_normal_bg_color == 0 || *T_UT != NUL)); } --- 8960,8966 ---- || gui.in_use #endif #ifdef FEAT_TERMTRUECOLOR ! || (p_guicolors && cterm_normal_bg_gui_color != (long_u)INVALCOLOR) #endif || cterm_normal_bg_color == 0 || *T_UT != NUL)); } *** ../vim-7.4.1773/src/syntax.c 2016-04-22 11:24:36.524487481 +0200 --- src/syntax.c 2016-04-22 11:47:17.874450920 +0200 *************** *** 8788,8796 **** 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_TERMTRUECOLOR ! 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 != INVALCOLOR) new_en.ae_u.cterm.bg_rgb = spell_aep->ae_u.cterm.bg_rgb; #endif } --- 8788,8796 ---- 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_TERMTRUECOLOR ! if (spell_aep->ae_u.cterm.fg_rgb != (long_u)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) new_en.ae_u.cterm.bg_rgb = spell_aep->ae_u.cterm.bg_rgb; #endif } *** ../vim-7.4.1773/src/term.c 2016-04-22 11:24:36.524487481 +0200 --- src/term.c 2016-04-22 11:47:52.522092729 +0200 *************** *** 1383,1391 **** { int len; int pos; - char *color; ! ignored = fgets(line, LINE_LEN, fd); len = strlen(line); if (len <= 1 || line[len-1] != '\n') --- 1383,1390 ---- { int len; int pos; ! (void)fgets(line, LINE_LEN, fd); len = strlen(line); if (len <= 1 || line[len-1] != '\n') *************** *** 1397,1405 **** if (i != 3) continue; ! color = line + pos; ! ! if (STRICMP(color, name) == 0) { fclose(fd); return (guicolor_T) RGB(r, g, b); --- 1396,1402 ---- if (i != 3) continue; ! if (STRICMP(line + pos, name) == 0) { fclose(fd); return (guicolor_T) RGB(r, g, b); *** ../vim-7.4.1773/src/version.c 2016-04-22 11:24:36.528487441 +0200 --- src/version.c 2016-04-22 11:46:04.019214504 +0200 *************** *** 755,756 **** --- 755,758 ---- { /* Add new patch number below this line */ + /**/ + 1774, /**/ -- DENNIS: Listen -- strange women lying in ponds distributing swords is no basis for a system of government. Supreme executive power derives from a mandate from the masses, not from some farcical aquatic ceremony. The Quest for the Holy Grail (Monty Python) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///