• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

作図ソフト dia の改良版


Commit MetaInfo

Revisãof3ca88cf2ac2cd52e1312c310c3cfbb9f2ce2961 (tree)
Hora2014-09-08 04:20:08
AutorHans Breuer <hans@breu...>
CommiterHans Breuer

Mensagem de Log

[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]

{ 3, N_("Triangle"), },

It was easier to change the struct definition.

Mudança Sumário

Diff

--- a/objects/Misc/n_gon.c
+++ b/objects/Misc/n_gon.c
@@ -311,7 +311,8 @@ _ngon_make_name (Ngon *ng)
311311 {
312312 static struct {
313313 int v;
314- const char *n[3];
314+ const char *n0;
315+ const char *n1;
315316 } _keys[] = {
316317 { 3, N_("Triangle"), },
317318 { 4, N_("Square"), },
@@ -339,9 +340,9 @@ _ngon_make_name (Ngon *ng)
339340 for (i = 0; i < G_N_ELEMENTS(_keys); ++i) {
340341 if (_keys[i].v == ng->num_rays) {
341342 if (ng->kind == NGON_CONVEX)
342- name = _keys[i].n[0];
343+ name = _keys[i].n0;
343344 else if (ng->kind == NGON_CROSSING)
344- name = _keys[i].n[1];
345+ name = _keys[i].n1;
345346 }
346347 }
347348 if (!name) {