From 02ae95fa793fee8d4d8ac3486e3506c0d33e21ea Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sun, 20 Jun 2021 07:59:10 +0100 Subject: [PATCH] non-windows: explicit cast vaarg to mode_t --- lib/core/libwebsockets.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/libwebsockets.c b/lib/core/libwebsockets.c index c7ccd0552..e8bb037e8 100644 --- a/lib/core/libwebsockets.c +++ b/lib/core/libwebsockets.c @@ -219,7 +219,7 @@ int lws_open(const char *__file, int __oflag, ...) * (aka 'unsigned short'); this va_arg has undefined behavior because * arguments will be promoted to 'int' */ - n = open(__file, __oflag, va_arg(ap, unsigned int)); + n = open(__file, __oflag, (mode_t)va_arg(ap, unsigned int)); #endif else n = open(__file, __oflag);