clang doesn't like mode_t type as an argument to va_arg():
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'
mode = va_arg(ap, mode_t);
^~~~~~
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This is normally not an issue since the tests which use mocked open() do
not create files. But once coverage build is enabled, gcov_open will use
O_CREATE and real_open will read random data rather than the actual mode
argument.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>