Am 10.11.2015 um 18:10 hat Peter Maydell geschrieben:
> On 10 November 2015 at 14:09, Kevin Wolf <[email protected]> wrote:
> > The following changes since commit a8b4f9585a0bf5186fca793ce2c5d754cd8ec49a:
> >
> > Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2015-11-10'
> > into staging (2015-11-10 09:39:24 +0000)
> >
> > are available in the git repository at:
> >
> >
> > git://repo.or.cz/qemu/kevin.git tags/for-upstream
> >
> > for you to fetch changes up to c400bddb916268394e352f82809eb4728424a5b1:
> >
> > Merge remote-tracking branch
> > 'mreitz/tags/pull-block-for-kevin-2015-11-10' into queue-block (2015-11-10
> > 14:59:26 +0100)
> >
> > ----------------------------------------------------------------
> >
> > Block layer patches
>
> Fails to build on OSX :-(
>
> /Users/pm215/src/qemu-for-merges/ui/cocoa.m:1121:40: error: too few
> arguments to function call, expected 7, have 5
> &err);
> ^
> ./qmp-commands.h:61:1: note: 'qmp_blockdev_change_medium' declared here
> void qmp_blockdev_change_medium(const char *device, const char
> *filename, bool has_format, const char *format, bool
> has_read_only_mode, BlockdevChangeReadOnlyMode read_only_mode, Error
> **errp);
> ^
> 1 error generated.
>
> Also some warnings:
>
> /Users/pm215/src/qemu-for-merges/qemu-io-cmds.c:772:56: warning:
> format specifies type 'size_t' (aka 'unsigned long') but the argument
> has type 'unsigned long lo
> ng' [-Wformat]
> printf("length cannot exceed %zu, given %s\n", SIZE_MAX,
> argv[optind]);
> ~~~ ^~~~~~~~
> %llu
> /usr/include/stdint.h:153:20: note: expanded from macro 'SIZE_MAX'
> #define SIZE_MAX UINT64_MAX
> ^~~~~~~~~~
> /usr/include/stdint.h:87:27: note: expanded from macro 'UINT64_MAX'
> #define UINT64_MAX 18446744073709551615ULL
> ^~~~~~~~~~~~~~~~~~~~~~~
Isn't that actually a bug in the system headers? If I understand the
spec correctly, SIZE_MAX should be size_t. ("this expression shall have
the same type as would an expression that is an object of the
corresponding type converted according to the integer promotions.")
Anyway, I'll squash in a workaround that explicitly casts to uint64_t.
Kevin