[dia] [warningectomy] missing braces around initializer
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] [warningectomy] missing braces around initializer
- Date: Sun, 7 Sep 2014 21:45:23 +0000 (UTC)
commit f3ca88cf2ac2cd52e1312c310c3cfbb9f2ce2961
Author: Hans Breuer <hans breuer org>
Date: Sun Sep 7 21:20:08 2014 +0200
[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.
objects/Misc/n_gon.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/objects/Misc/n_gon.c b/objects/Misc/n_gon.c
index 62cb37f..fe7b4b1 100644
--- a/objects/Misc/n_gon.c
+++ b/objects/Misc/n_gon.c
@@ -311,7 +311,8 @@ _ngon_make_name (Ngon *ng)
{
static struct {
int v;
- const char *n[3];
+ const char *n0;
+ const char *n1;
} _keys[] = {
{ 3, N_("Triangle"), },
{ 4, N_("Square"), },
@@ -339,9 +340,9 @@ _ngon_make_name (Ngon *ng)
for (i = 0; i < G_N_ELEMENTS(_keys); ++i) {
if (_keys[i].v == ng->num_rays) {
if (ng->kind == NGON_CONVEX)
- name = _keys[i].n[0];
+ name = _keys[i].n0;
else if (ng->kind == NGON_CROSSING)
- name = _keys[i].n[1];
+ name = _keys[i].n1;
}
}
if (!name) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]