mbox series

[0/6] fix uninitialized variable warning

Message ID 20201103015228.2250547-1-kuhn.chenqun@huawei.com
Headers show
Series fix uninitialized variable warning | expand

Message

Chen Qun Nov. 3, 2020, 1:52 a.m. UTC
Hi all,
  There are some variables initialized warnings reported by the compiler,
even if the default CFLAG for the compiler parameters are uesed.

This serial has added some default values or changed the assignment places for the variablies to fix them.

Thanks,
Chen Qun


Chen Qun (6):
  target/xtensa: fix uninitialized variable warning
  hw/rdma/rdma_backend: fix uninitialized variable warning in
    rdma_poll_cq()
  util/qemu-timer: fix uninitialized variable warning in
    timer_mod_anticipate_ns()
  util/qemu-timer: fix uninitialized variable warning for expire_time
  plugins/loader: fix uninitialized variable warning in
    plugin_reset_uninstall()
  migration: fix uninitialized variable warning in
    migrate_send_rp_req_pages()

 hw/rdma/rdma_backend.c    | 2 +-
 migration/migration.c     | 2 +-
 plugins/loader.c          | 2 +-
 target/xtensa/translate.c | 2 +-
 util/qemu-timer.c         | 8 +++-----
 5 files changed, 7 insertions(+), 9 deletions(-)

Comments

Peter Maydell Nov. 3, 2020, 10:15 a.m. UTC | #1
On Tue, 3 Nov 2020 at 02:07, Chen Qun <kuhn.chenqun@huawei.com> wrote:
>
> Hi all,
>   There are some variables initialized warnings reported by the compiler,
> even if the default CFLAG for the compiler parameters are uesed.
>
> This serial has added some default values or changed the assignment places for the variablies to fix them.


Hi; if you're reporting/fixing compiler errors/warnings please
can you include the compiler version that produced the error
in the commit message? This is helpful for telling us whether
it's a problem with older compilers or whether this is a new
compiler that checks for some things more carefully.

thanks
-- PMM
Chen Qun Nov. 3, 2020, 10:44 a.m. UTC | #2
> -----Original Message-----
> From: Peter Maydell [mailto:peter.maydell@linaro.org]
> Sent: Tuesday, November 3, 2020 6:15 PM
> To: Chenqun (kuhn) <kuhn.chenqun@huawei.com>
> Cc: QEMU Developers <qemu-devel@nongnu.org>; QEMU Trivial
> <qemu-trivial@nongnu.org>; Zhanghailiang
> <zhang.zhanghailiang@huawei.com>; ganqixin <ganqixin@huawei.com>
> Subject: Re: [PATCH 0/6] fix uninitialized variable warning
> 
> On Tue, 3 Nov 2020 at 02:07, Chen Qun <kuhn.chenqun@huawei.com> wrote:
> >
> > Hi all,
> >   There are some variables initialized warnings reported by the
> > compiler, even if the default CFLAG for the compiler parameters are uesed.
> >
> > This serial has added some default values or changed the assignment places
> for the variablies to fix them.
> 
> 
> Hi; if you're reporting/fixing compiler errors/warnings please can you include
> the compiler version that produced the error in the commit message? This is
> helpful for telling us whether it's a problem with older compilers or whether this
> is a new compiler that checks for some things more carefully.
> 
Oops, I didn't consider that. 
These warnings were reported by GCC 9.3, 

Thanks,
Chen Qun