作図ソフト dia の改良版
Revisão | f3ca88cf2ac2cd52e1312c310c3cfbb9f2ce2961 (tree) |
---|---|
Hora | 2014-09-08 04:20:08 |
Autor | Hans Breuer <hans@breu...> |
Commiter | Hans Breuer |
[warningectomy] missing braces around initializer
n_gon.c: In function '_ngon_make_name':
n_gon.c:316:5: warning: missing braces around initializer [-Wmissing-braces]
It was easier to change the struct definition.
@@ -311,7 +311,8 @@ _ngon_make_name (Ngon *ng) | ||
311 | 311 | { |
312 | 312 | static struct { |
313 | 313 | int v; |
314 | - const char *n[3]; | |
314 | + const char *n0; | |
315 | + const char *n1; | |
315 | 316 | } _keys[] = { |
316 | 317 | { 3, N_("Triangle"), }, |
317 | 318 | { 4, N_("Square"), }, |
@@ -339,9 +340,9 @@ _ngon_make_name (Ngon *ng) | ||
339 | 340 | for (i = 0; i < G_N_ELEMENTS(_keys); ++i) { |
340 | 341 | if (_keys[i].v == ng->num_rays) { |
341 | 342 | if (ng->kind == NGON_CONVEX) |
342 | - name = _keys[i].n[0]; | |
343 | + name = _keys[i].n0; | |
343 | 344 | else if (ng->kind == NGON_CROSSING) |
344 | - name = _keys[i].n[1]; | |
345 | + name = _keys[i].n1; | |
345 | 346 | } |
346 | 347 | } |
347 | 348 | if (!name) { |