On Mon, May 04, 2020 at 01:17:19PM +0100, Peter Maydell wrote:
> On Mon, 4 May 2020 at 13:05, Laurent Vivier <laurent@vivier.eu> wrote:
> >
> > The following changes since commit 2ef486e76d64436be90f7359a3071fb2a56ce835:
> >
> > Merge remote-tracking branch 'remotes/marcel/tags/rdma-pull-request' into s=
> > taging (2020-05-03 14:12:56 +0100)
> >
> > are available in the Git repository at:
> >
> > git://github.com/vivier/qemu.git tags/trivial-branch-for-5.1-pull-request
> >
> > for you to fetch changes up to 4341a0106781043a708c061b676312e5bb5d4488:
> >
> > hw/timer/pxa2xx_timer: Add assertion to silent static analyzer warning (202=
> > 0-05-04 12:06:21 +0200)
> >
> > ----------------------------------------------------------------
> > trivial patches (20200504)
> >
> > Silent static analyzer warning
> > Remove dead assignments
> > Support -chardev serial on macOS
> > Update MAINTAINERS
> > Some cosmetic changes
>
>
> Compile failure, OSX:
> /Users/pm215/src/qemu-for-merges/block/file-posix.c:1620:9: error:
> unused variable 'ret' [-Werror,-Wunused-variable]
> int ret;
> ^
>
> Compile failure, aarch32 (but probably the result of whatever
> crypto options/dependent libraries are on that setup):
>
> In file included from /home/peter.maydell/qemu/crypto/cipher.c:157:0:
> /home/peter.maydell/qemu/crypto/cipher-builtin.c: In function
> 'qcrypto_cipher_aes_xts_encrypt':
> /home/peter.maydell/qemu/crypto/cipher-builtin.c:136:36: error:
> passing argument 1 of 'qcrypto_cipher_aes_ecb_encrypt' discards
> 'const' qualifier from pointer target type
> [-Werror=discarded-qualifiers]
> qcrypto_cipher_aes_ecb_encrypt(&aesctx->enc, src, dst, length);
> ^
> /home/peter.maydell/qemu/crypto/cipher-builtin.c:77:13: note: expected
> 'AES_KEY * {aka struct aes_key_st *}' but argument is of type 'const
> AES_KEY * {aka const struct aes_key_st *}'
> static void qcrypto_cipher_aes_ecb_encrypt(AES_KEY *key,
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /home/peter.maydell/qemu/crypto/cipher-builtin.c: In function
> 'qcrypto_cipher_aes_xts_decrypt':
> /home/peter.maydell/qemu/crypto/cipher-builtin.c:147:36: error:
> passing argument 1 of 'qcrypto_cipher_aes_ecb_decrypt' discards
> 'const' qualifier from pointer target type
> [-Werror=discarded-qualifiers]
> qcrypto_cipher_aes_ecb_decrypt(&aesctx->dec, src, dst, length);
> ^
> /home/peter.maydell/qemu/crypto/cipher-builtin.c:103:13: note:
> expected 'AES_KEY * {aka struct aes_key_st *}' but argument is of type
> 'const AES_KEY * {aka const struct aes_key_st *}'
> static void qcrypto_cipher_aes_ecb_decrypt(AES_KEY *key,
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This failure shows that patch 4 is wrong. The cast is not redundant,
it is explicitly required in order to discard 'const'. Please just
drop patch 4.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|