Kazunobu Kuriyama wrote:
> While gcc5 does not complain of it, clang gives us the following warning:
>
> clang -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X_UNIX -I/opt/local/include
> -std=c89 -g -O2 -Wall -Wextra -Wshadow -U_FORTIFY_SOURCE
> -D_FORTIFY_SOURCE=1 -o objects/main.o main.c
> In file included from main.c:11:
> In file included from ./vim.h:2077:
> ./globals.h:387:43: warning: missing field 'br_buf_free_count' initializer
> [-Wmissing-field-initializers]
> EXTERN bufref_T au_new_curbuf INIT(= {NULL});
> ^
> 1 warning generated.
>
> In addition to that, we have other warnings due to the same reason when
> json_test.c and memfile_test.c are compiled.
>
> Attached is a patch for fixing the issue.
>
> The idea comes from my vague memory about a macro which was, IIRC, used
> somewhere in a huge, old X11R6 source tree. That memory is too old for me
> to tell you its exact name and place where it was defined.
>
> That said, it looks to me that the way of the patch is not bad in
> comparison with other possible solutions, since it requires only a minimum
> addition to the code, keeps the current 'INIT(= val)` style, and is proven
> to work with C89 preprocessors.
Nice trick. I can only find one more place where using COMMA makes
sense.
--
I wonder, do vegetarians eat fruit bats?
/// Bram Moolenaar -- [email protected] -- 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 ///
--
--
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.