qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] lm32: fix build breakage due to uninitialized variable 'r'
@ 2011-04-13 12:43 Anthony Liguori
  2011-04-13 13:04 ` Stefan Hajnoczi
  0 siblings, 1 reply; 3+ messages in thread
From: Anthony Liguori @ 2011-04-13 12:43 UTC (permalink / raw)
  To: qemu-devel; +Cc: Edgar E Igleasias, Michael Walle, Anthony Liguori

gcc 4.5.2 correctly complains that r is potentially uninitialized in this
function.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 hw/milkymist-pfpu.c |    2 +-
 roms/seabios        |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/milkymist-pfpu.c b/hw/milkymist-pfpu.c
index 4831e00..94e6315 100644
--- a/hw/milkymist-pfpu.c
+++ b/hw/milkymist-pfpu.c
@@ -163,7 +163,7 @@ static int pfpu_decode_insn(MilkymistPFPUState *s)
     uint32_t reg_b = (insn >> 11) & 0x7f;
     uint32_t op = (insn >> 7) & 0xf;
     uint32_t reg_d = insn & 0x7f;
-    uint32_t r;
+    uint32_t r = 0;
     int latency = 0;
 
     switch (op) {
diff --git a/roms/seabios b/roms/seabios
index cc97564..06d0bdd 160000
--- a/roms/seabios
+++ b/roms/seabios
@@ -1 +1 @@
-Subproject commit cc975646af69f279396d4d5e1379ac6af80ee637
+Subproject commit 06d0bdd9e2e20377b3180e4986b14c8549b393e4
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] lm32: fix build breakage due to uninitialized variable 'r'
  2011-04-13 12:43 [Qemu-devel] [PATCH] lm32: fix build breakage due to uninitialized variable 'r' Anthony Liguori
@ 2011-04-13 13:04 ` Stefan Hajnoczi
  2011-04-13 13:18   ` Anthony Liguori
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Hajnoczi @ 2011-04-13 13:04 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Edgar E Igleasias, Michael Walle, qemu-devel

On Wed, Apr 13, 2011 at 1:43 PM, Anthony Liguori <aliguori@us.ibm.com> wrote:
> diff --git a/roms/seabios b/roms/seabios
> index cc97564..06d0bdd 160000
> --- a/roms/seabios
> +++ b/roms/seabios
> @@ -1 +1 @@
> -Subproject commit cc975646af69f279396d4d5e1379ac6af80ee637
> +Subproject commit 06d0bdd9e2e20377b3180e4986b14c8549b393e4

This doesn't look intentional.

I've had the same problem when using git commit -a.  Any suggestions
to avoid adding these submodule commits by mistake?

Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] lm32: fix build breakage due to uninitialized variable 'r'
  2011-04-13 13:04 ` Stefan Hajnoczi
@ 2011-04-13 13:18   ` Anthony Liguori
  0 siblings, 0 replies; 3+ messages in thread
From: Anthony Liguori @ 2011-04-13 13:18 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: Edgar E Igleasias, Michael Walle, qemu-devel

On 04/13/2011 08:04 AM, Stefan Hajnoczi wrote:
> On Wed, Apr 13, 2011 at 1:43 PM, Anthony Liguori<aliguori@us.ibm.com>  wrote:
>> diff --git a/roms/seabios b/roms/seabios
>> index cc97564..06d0bdd 160000
>> --- a/roms/seabios
>> +++ b/roms/seabios
>> @@ -1 +1 @@
>> -Subproject commit cc975646af69f279396d4d5e1379ac6af80ee637
>> +Subproject commit 06d0bdd9e2e20377b3180e4986b14c8549b393e4
> This doesn't look intentional.

!~@#!@#!@#

> I've had the same problem when using git commit -a.  Any suggestions
> to avoid adding these submodule commits by mistake?

I've been meaning to just look at fixing git submodule.  The problem is 
that when you move between branches, the submodule doesn't get updated 
correctly.

Regards,

Anthony Liguori

> Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-04-13 13:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-13 12:43 [Qemu-devel] [PATCH] lm32: fix build breakage due to uninitialized variable 'r' Anthony Liguori
2011-04-13 13:04 ` Stefan Hajnoczi
2011-04-13 13:18   ` Anthony Liguori

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).