qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] c8115f: block/vpc: fix uninitialised variable


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] c8115f: block/vpc: fix uninitialised variable compiler war...
Date: Fri, 21 Jul 2017 08:23:51 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: c8115f8eb8b6c4742e5e0c0c644904cd81ed65fa
      
https://github.com/qemu/qemu/commit/c8115f8eb8b6c4742e5e0c0c644904cd81ed65fa
  Author: Mark Cave-Ayland <address@hidden>
  Date:   2017-07-21 (Fri, 21 Jul 2017)

  Changed paths:
    M block/vpc.c

  Log Message:
  -----------
  block/vpc: fix uninitialised variable compiler warning

Since commit cfc87e00 "block/vpc.c: Handle write failures in
get_image_offset()" older versions of gcc (in this case 4.7) incorrectly
warn that "ret" can be used uninitialised in vpc_co_pwritev().

Setting ret to 0 at the start of vpc_co_pwritev() prevents the warning
in gcc 4.7 and enables compilation with -Werror to succeed.

Signed-off-by: Mark Cave-Ayland <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 4a65a86af64cc3247f1def97692c9b78b7cfc401
      
https://github.com/qemu/qemu/commit/4a65a86af64cc3247f1def97692c9b78b7cfc401
  Author: Peter Maydell <address@hidden>
  Date:   2017-07-21 (Fri, 21 Jul 2017)

  Changed paths:
    M bsd-user/bsdload.c

  Log Message:
  -----------
  bsd-user/bsdload.c: Remove write-only id_change variable

On OpenBSD the compiler complains:
bsd-user/bsdload.c:54:17: warning: variable 'id_change' set but not used 
[-Wunused-but-set-variable]

This is dead code that was originally copied from linux-user.
We fixed this in linux-user in commit 331c23b5ca44293d1 in 2011;
delete the useless code from bsd-user too.

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Message-id: address@hidden


  Commit: e4335180d2b40de8a5027030edbcd89aa6557bbc
      
https://github.com/qemu/qemu/commit/e4335180d2b40de8a5027030edbcd89aa6557bbc
  Author: Peter Maydell <address@hidden>
  Date:   2017-07-21 (Fri, 21 Jul 2017)

  Changed paths:
    M bsd-user/main.c

  Log Message:
  -----------
  bsd-user/main.c: Fix unused variable warning

On OpenBSD the compiler warns:
bsd-user/main.c:622:21: warning: variable 'sig' set but not used 
[-Wunused-but-set-variable]

This is because a lot of the signal delivery code is #if-0'd
out as unused. Reshuffle #ifdefs a bit to silence the warning.

(We make the minimum change here rather than removing all the
bsd-user patchset which should make this all work correctly and
there's no point giving them an awkward rebase task.)

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden


  Commit: 951fedfceeda1b09ac8aa1f5263288b65e13caca
      
https://github.com/qemu/qemu/commit/951fedfceeda1b09ac8aa1f5263288b65e13caca
  Author: Peter Maydell <address@hidden>
  Date:   2017-07-21 (Fri, 21 Jul 2017)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: Never use 'uname' to identify target OS

For a very long time we have used 'uname -s' as our fallback if
we don't identify the target OS using a compiler #define. This
obviously doesn't work for cross-compilation, and we've had
a comment suggesting we fix this in configure for a long time.
Since we now have an exhaustive list of which OSes we can run
on (thanks to commit 898be3e0415 making an unrecognized OS
be a fatal error), we know which ones we're missing.

Add check_define tests for the remaining OSes we support.  The
defines checked are based on ones we already use in the codebase for
identifying the host OS (with the exception of GNU/kFreeBSD).
We can now set bogus_os immediately rather than doing it later.

We leave the comment about uname being bad untouched, since
there is still a use of it for the fallback for unrecognized
host CPU type.

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: address@hidden


  Commit: 91939262ffcd3c85ea6a4793d3029326eea1d649
      
https://github.com/qemu/qemu/commit/91939262ffcd3c85ea6a4793d3029326eea1d649
  Author: Peter Maydell <address@hidden>
  Date:   2017-07-21 (Fri, 21 Jul 2017)

  Changed paths:
    M configure
    M include/fpu/softfloat.h

  Log Message:
  -----------
  configure: Drop ancient Solaris 9 and earlier support

Solaris 9 was released in 2002, its successor Solaris 10 was
released in 2005, and Solaris 9 was end-of-lifed in 2014.
Nobody has stepped forward to express interest in supporting
Solaris of any flavour, so removing support for the ancient
versions seems uncontroversial.

In particular, this allows us to remove a use of 'uname'
in configure that won't work if you're cross-compiling.

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Daniel P. Berrange <address@hidden>
Message-id: address@hidden


Compare: https://github.com/qemu/qemu/compare/ff9b5475021d...91939262ffcd

reply via email to

[Prev in Thread] Current Thread [Next in Thread]