aboutsummaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2017-02-27 09:25:39 -0500
committerDamjan Marion <dmarion.lists@gmail.com>2017-02-28 11:23:56 +0000
commit05472b625fc401f1514a148f7122e6c3c571765a (patch)
tree31c982fbb52f6987dbac63bc139c876d0e3a2ac8 /src/tools
parent987e11dffecc4ec3f55ae3d2fa5d2cc40dcf91f0 (diff)
Fix warning in generated code
Change-Id: Ie56fca84a8a0ed77ee480e8078e6e9b3f4cef105 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/vppapigen/node.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/tools/vppapigen/node.c b/src/tools/vppapigen/node.c
index 260c6f2ef7b..54fef8f1e59 100644
--- a/src/tools/vppapigen/node.c
+++ b/src/tools/vppapigen/node.c
@@ -753,8 +753,14 @@ void node_complex_generate (node_t *this, enum passid which, FILE *fp)
fprintf(fp, "vl_print(handle, \"%s%s ----- \\n\");\n",
union_prefix, member_name);
indent_me(fp);
- fprintf(fp, "%s_print(&a->%s%s, handle);\n",
- CDATA0, union_prefix, member_name);
+
+ if (deeper->type == NODE_VECTOR)
+ fprintf(fp, "%s_print(a->%s%s, handle);\n",
+ CDATA0, union_prefix, member_name);
+ else
+ fprintf(fp, "%s_print(&a->%s%s, handle);\n",
+ CDATA0, union_prefix, member_name);
+
indent_me(fp);
fprintf(fp, "vl_print(handle, \"%s%s ----- END \\n\");\n",
union_prefix, member_name);
@@ -772,8 +778,12 @@ void node_complex_generate (node_t *this, enum passid which, FILE *fp)
}
indent_me(fp);
- fprintf(fp, "%s_endian(&a->%s%s);\n",
- CDATA0, union_prefix, member_name);
+ if (deeper->type == NODE_VECTOR)
+ fprintf(fp, "%s_endian(a->%s%s);\n",
+ CDATA0, union_prefix, member_name);
+ else
+ fprintf(fp, "%s_endian(&a->%s%s);\n",
+ CDATA0, union_prefix, member_name);
break;
case PYTHON_PASS:
fprintf(fp, "('%s',", CDATA0);