How to repair warning: missing braces around initializer?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: The warning is produced by the c code generated by vala. warning: missing braces around initializer The code works but the warning is annoying. The vala code referenced by the warning is struct Position {uint x; uint y;} private static Position positions[8]; The generated C code is static Position det_positions[8] = {0}; I've tried initializing positions half a dozen different ways but can't seem to get the syntax to satisfy the warning. Is this GCC bug 53119 or is there a way to fix it? 回答1: Yes, this appears to be related to GCC bug 53119