On Thu, May 03, 2018 at 12:54:20PM +0200, Andrea Bolognani wrote:
Clang complains about it:
error: second argument to 'va_arg' is of promotable type
'mode_t' (aka 'unsigned short'); this va_arg has undefined
behavior because arguments will be promoted to 'int'
[-Werror,-Wvarargs]
mode = va_arg(ap, mode_t);
^~~~~~
Work around the issue by passing int to va_arg() and casting
its return value to mode_t afterwards.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
tests/nssmock.c | 2 +-
tests/vircgroupmock.c | 2 +-
tests/virpcimock.c | 2 +-
tests/virtestmock.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange(a)redhat.com>
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 :|