diff --git a/tests/nssmock.c b/tests/nssmock.c index 7929c3061c..fc8e6b22f0 100644 --- a/tests/nssmock.c +++ b/tests/nssmock.c @@ -87,7 +87,7 @@ open(const char *path, int flags, ...) va_list ap; mode_t mode; va_start(ap, flags); - mode = va_arg(ap, int); + mode = (mode_t) va_arg(ap, int); va_end(ap); ret = real_open(newpath ? newpath : path, flags, mode); } else { diff --git a/tests/vircgroupmock.c b/tests/vircgroupmock.c index 56337c2f3e..51861be38e 100644 --- a/tests/vircgroupmock.c +++ b/tests/vircgroupmock.c @@ -731,7 +731,7 @@ int open(const char *path, int flags, ...) va_list ap; mode_t mode; va_start(ap, flags); - mode = va_arg(ap, mode_t); + mode = (mode_t) va_arg(ap, int); va_end(ap); ret = real_open(newpath ? newpath : path, flags, mode); } else { diff --git a/tests/virpcimock.c b/tests/virpcimock.c index 79352175de..7e4ac191d0 100644 --- a/tests/virpcimock.c +++ b/tests/virpcimock.c @@ -983,7 +983,7 @@ open(const char *path, int flags, ...) va_list ap; mode_t mode; va_start(ap, flags); - mode = va_arg(ap, mode_t); + mode = (mode_t) va_arg(ap, int); va_end(ap); ret = real_open(newpath ? newpath : path, flags, mode); } else { diff --git a/tests/virtestmock.c b/tests/virtestmock.c index 255dd43560..9b91adec77 100644 --- a/tests/virtestmock.c +++ b/tests/virtestmock.c @@ -180,7 +180,7 @@ int open(const char *path, int flags, ...) va_list ap; mode_t mode; va_start(ap, flags); - mode = va_arg(ap, mode_t); + mode = (mode_t) va_arg(ap, int); va_end(ap); ret = real_open(path, flags, mode); } else {