From: Ian Campbell <ian.campbell@citrix.com>
To: xen-devel@lists.xen.org
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
ian.jackson@eu.citrix.com, Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH] tools: libxl: testidl: initialise the KeyedUnion keyvar before the union
Date: Wed, 4 Dec 2013 17:48:56 +0000 [thread overview]
Message-ID: <1386179336-2829-1-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <529F663A.4030604@citrix.com>
This is Coverity CID 1135378 and 1135379.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
---
tools/libxl/gentest.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/libxl/gentest.py b/tools/libxl/gentest.py
index 6fab493..722b7f4 100644
--- a/tools/libxl/gentest.py
+++ b/tools/libxl/gentest.py
@@ -42,6 +42,7 @@ def gen_rand_init(ty, v, indent = " ", parent = None):
elif isinstance(ty, idl.KeyedUnion):
if parent is None:
raise Exception("KeyedUnion type must have a parent")
+ s += gen_rand_init(ty.keyvar.type, parent + ty.keyvar.name, indent, parent)
s += "switch (%s) {\n" % (parent + ty.keyvar.name)
for f in ty.fields:
(nparent,fexpr) = ty.member(v, f, parent is None)
--
1.7.10.4
next prev parent reply other threads:[~2013-12-04 17:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-04 17:28 New Coverity issues (tools/libxl/testidl.c) Andrew Cooper
2013-12-04 17:48 ` Ian Campbell [this message]
2013-12-04 17:54 ` [PATCH] tools: libxl: testidl: initialise the KeyedUnion keyvar before the union Andrew Cooper
2013-12-05 11:39 ` Ian Campbell
2013-12-10 14:12 ` Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1386179336-2829-1-git-send-email-ian.campbell@citrix.com \
--to=ian.campbell@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).