Disclaimer: I'm sure there's a more elegant way to achieve the same result. :-)
On Tuesday, May 22, 2018 at 5:49:54 PM UTC-5, Michael Jarvis wrote: > This bug is very similar to another issue I reported, that was fixed > > in patch 7.4.1819. > > The error message is: > term.c:2877:2: warning: embedding a directive within macro arguments has > undefined behavior [-Wembedded-directive] > \#if defined(FEAT_VTP) && defined(FEAT_TERMGUICOLORS) > ^ > 1 warning generated. > > > The issue is caused because sprintf() is implemented as a macro on some > > systems. > > Therefore, this sprintf() call has its parameters conditionally modified > > by the preprocessor, and embedding a preprocessor directive within macro > > arguments causes undefined behavior. > > My proposed fix would be to move the preprocessor check outside the call > > to sprintf(). > > > > You can view, comment on, or merge this pull request online at: > > https://github.com/vim/vim/pull/2946 > > Commit Summary > > Fix warning about undefined behavior in src/term.c > > > File Changes > > > M > src/term.c > (10) > > > > Patch Links: > > https://github.com/vim/vim/pull/2946.patch > https://github.com/vim/vim/pull/2946.diff > > > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub -- -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
