sim: ppc: fix Wnonnull warning
authorTom de Vries <tdevries@suse.de>
Wed, 19 May 2021 16:42:59 +0000 (18:42 +0200)
committerTom de Vries <tdevries@suse.de>
Wed, 19 May 2021 16:42:59 +0000 (18:42 +0200)
commitbfff0efb3d8283a48825abc1701bb39a56d223c5
tree15d31e334d8ee55cfbee07e519457ce3885defd7
parent0d7e3cd15fa770e172f442e1a984809fa8ac0fdc
sim: ppc: fix Wnonnull warning

When compiling with --enable-werror and CFLAGS="-O0 -g -Wall", we run into:
...
src/sim/ppc/emul_netbsd.c: In function 'do_gettimeofday':
src/sim/ppc/emul_netbsd.c:770:16: error: null argument where non-null \
  required (argument 1) [-Werror=nonnull]
   int status = gettimeofday((t_addr != 0 ? &t : NULL),
                ^~~~~~~~~~~~
...

Fix this by unconditionally passing &t as first argument.
sim/ppc/emul_netbsd.c
This page took 0.056152 seconds and 4 git commands to generate.