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?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…