1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

non-windows: explicit cast vaarg to mode_t

This commit is contained in:
Andy Green 2021-06-20 07:59:10 +01:00
parent 7c3c179e0e
commit 02ae95fa79

View file

@ -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);