]> git.ipfire.org Git - thirdparty/qemu.git/commit
block/blkio: Make s->mem_region_alignment be 64 bits
authorRichard W.M. Jones <rjones@redhat.com>
Tue, 30 Jan 2024 12:20:01 +0000 (12:20 +0000)
committerMichael Tokarev <mjt@tls.msk.ru>
Fri, 9 Feb 2024 07:44:49 +0000 (10:44 +0300)
commitb91715588a101024c644a322ad2f43af50a8d2fd
treed1998363e6eda142f1ba1614b24a6031a72adb92
parent84c9704b8e4a347ff74f17c018e58e7f90ca63fc
block/blkio: Make s->mem_region_alignment be 64 bits

With GCC 14 the code failed to compile on i686 (and was wrong for any
version of GCC):

../block/blkio.c: In function ‘blkio_file_open’:
../block/blkio.c:857:28: error: passing argument 3 of ‘blkio_get_uint64’ from incompatible pointer type [-Wincompatible-pointer-types]
  857 |                            &s->mem_region_alignment);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~
      |                            |
      |                            size_t * {aka unsigned int *}
In file included from ../block/blkio.c:12:
/usr/include/blkio.h:49:67: note: expected ‘uint64_t *’ {aka ‘long long unsigned int *’} but argument is of type ‘size_t *’ {aka ‘unsigned int *’}
   49 | int blkio_get_uint64(struct blkio *b, const char *name, uint64_t *value);
      |                                                         ~~~~~~~~~~^~~~~

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Message-id: 20240130122006.2977938-1-rjones@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit 615eaeab3d318ba239d54141a4251746782f65c1)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
block/blkio.c