On 19-Oct-2021 08:14, Bram Moolenaar wrote:
Patch 8.2.3536
Problem:    The do_highlight() function is way too long.
Solution:   Split it into several functions. (Yegappan Lakshmanan,
             closes #9011)
Files:      src/highlight.c



After this patch mingw64 (gcc 11.2) throws these warnings when *not* compiled as a GUI:
<snip>
gcc -c -I. -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 -DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO -pipe -march=native -Wall -O3 -fomit-frame-pointer -freg-struct-return -fpie -fPIE  highlight.c -o objnative/highlight.o
highlight.c: In function 'highlight_set_guifg':
highlight.c:1111:17: warning: unused variable 'i' [-Wunused-variable]
 1111 |     long        i;
      |                 ^
highlight.c: In function 'highlight_set_guibg':
highlight.c:1178:17: warning: unused variable 'i' [-Wunused-variable]
 1178 |     int         i;
      |                 ^
</snip>

Attached is a patch that tries to fix it, but I'm not sure that it's correct.
Cheers
John

--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/6acebb2e-0d71-f006-ef80-ba00c4ead520%40internode.on.net.
1110a1111
> # if defined(FEAT_GUI)
1111a1113
> #endif
1177a1180
> # if defined(FEAT_GUI)
1178a1182
> #endif

Raspunde prin e-mail lui