[Libguestfs] [PATCH libnbd v2 2/3] copy: Do not use trim for zeroing
Richard W.M. Jones
rjones at redhat.com
Mon Feb 22 19:44:36 UTC 2021
This one still fails with:
gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../common/include -I../common/utils -Wall -Wvla -Werror -pthread -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -O3 -mavx2 -MT nbdcopy-pipe-ops.o -MD -MP -MF .deps/nbdcopy-pipe-ops.Tpo -c -o nbdcopy-pipe-ops.o `test -f 'pipe-ops.c' || echo './'`pipe-ops.c
pipe-ops.c:177:17: error: initialization of ‘_Bool (*)(struct rw *, uint64_t, uint64_t, _Bool)’ {aka ‘_Bool (*)(struct rw *, long unsigned int, long unsigned int, _Bool)’} from incompatible pointer type ‘_Bool (*)(struct rw *, uint64_t, uint64_t)’ {aka ‘_Bool (*)(struct rw *, long unsigned int, long unsigned int)’} [-Werror=incompatible-pointer-types]
177 | .synch_zero = pipe_synch_trim_zero,
| ^~~~~~~~~~~~~~~~~~~~
pipe-ops.c:177:17: note: (near initialization for ‘pipe_ops.synch_zero’)
pipe-ops.c:189:18: error: initialization of ‘_Bool (*)(struct rw *, struct command *, nbd_completion_callback, _Bool)’ from incompatible pointer type ‘_Bool (*)(struct rw *, struct command *, nbd_completion_callback)’ [-Werror=incompatible-pointer-types]
189 | .asynch_zero = pipe_asynch_trim_zero,
| ^~~~~~~~~~~~~~~~~~~~~
pipe-ops.c:189:18: note: (near initialization for ‘pipe_ops.asynch_zero’)
cc1: all warnings being treated as errors
Did you post the wrong version of this patch? I notice it still has
the *_trim methods.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
More information about the Libguestfs
mailing list