From: Jerone Young <jyoung5@us.ibm.com>
To: Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>
Cc: xen-devel <xen-devel@lists.xensource.com>,
Ian Pratt <Ian.Pratt@cl.cam.ac.uk>
Subject: RE: minor gcc4 fixes
Date: Mon, 11 Apr 2005 14:44:26 -0500 [thread overview]
Message-ID: <1113248666.5172.25.camel@thinkpad> (raw)
In-Reply-To: <A95E2296287EAD4EB592B5DEEFCE0E9D1E3AFB@liverpoolst.ad.cl.cam.ac.uk>
My explanation was a bit off (off like driving off a cliff),
The problem is that GCC4 is seeing is that variable such as frame (in
grant_table.c) is passed into a function without initialization. Again
for the variable sl1mfn (in shadow.c) does the same thing. So really
the patches should be:
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
--- xen/common/grant_table.c.old 2005-04-11 14:41:49.000000000
-0500
+++ xen/common/grant_table.c 2005-04-11 14:42:30.000000000 -0500
@@ -311,7 +311,7 @@ __gnttab_map_grant_ref(
struct exec_domain *led;
u16 dev_hst_ro_flags;
int handle;
- unsigned long frame, host_virt_addr;
+ unsigned long frame = 0, host_virt_addr;
int rc;
/* Returns 0 if TLB flush / invalidate required by caller.
--- xen/arch/x86/shadow.c.old 2005-04-11 14:38:51.000000000 -0500
+++ xen/arch/x86/shadow.c 2005-04-11 14:37:11.000000000 -0500
@@ -1594,7 +1594,7 @@ static inline unsigned long
shadow_make_snapshot(
struct domain *d, unsigned long gpfn, unsigned long gmfn)
{
- unsigned long smfn, sl1mfn;
+ unsigned long smfn, sl1mfn = 0;
void *original, *snapshot;
u32 min_max = 0;
int min, max, length;
On Mon, 2005-04-11 at 19:57 +0100, Ian Pratt wrote:
> > These patches initialize unsigned longs that are used in xen.
> > GCC4 complains about using unsigned longs that are not
> > initialized before use.
>
> Are any of these actually bug fixes, or simply work arrounds for some
> bizzare ggc4 behaviour?
>
> Ian
>
--
Jerone Young
IBM Linux Technology Center
jyoung5@us.ibm.com
512-838-1157 (T/L: 678-1157)
next prev parent reply other threads:[~2005-04-11 19:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-11 18:57 minor gcc4 fixes Ian Pratt
2005-04-11 19:44 ` Jerone Young [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-04-11 18:36 Jerone Young
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=1113248666.5172.25.camel@thinkpad \
--to=jyoung5@us.ibm.com \
--cc=Ian.Pratt@cl.cam.ac.uk \
--cc=m+Ian.Pratt@cl.cam.ac.uk \
--cc=xen-devel@lists.xensource.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.