aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhangjin Wu <[email protected]>2023-06-03 16:11:57 +0800
committerPaul E. McKenney <[email protected]>2023-06-09 11:46:10 -0700
commitf62ec079d0899331085ff3537848e55cc316d751 (patch)
tree3b70ca542d8f923704ec81fb441fec831e877a76
parent646ff7c7edaade6b1ea81fa2e132c52a346bba39 (diff)
tools/nolibc: open: fix up compile warning for arm
In function ‘open’: nolibc/sysroot/arm/include/sys.h:919:23: warning: ‘mode_t’ {aka ‘short unsigned int’} is promoted to ‘int’ when passed through ‘...’ 919 | mode = va_arg(args, mode_t); | ^ nolibc/sysroot/arm/include/sys.h:919:23: note: (so you should pass ‘int’ not ‘mode_t’ {aka ‘short unsigned int’} to ‘va_arg’) nolibc/sysroot/arm/include/sys.h:919:23: note: if this code is reached, the program will abort Signed-off-by: Zhangjin Wu <[email protected]> Reviewed-by: Thomas Weißschuh <[email protected]> Signed-off-by: Willy Tarreau <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
-rw-r--r--tools/include/nolibc/sys.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h
index 0160605444e7..856249a11890 100644
--- a/tools/include/nolibc/sys.h
+++ b/tools/include/nolibc/sys.h
@@ -862,7 +862,7 @@ int open(const char *path, int flags, ...)
va_list args;
va_start(args, flags);
- mode = va_arg(args, mode_t);
+ mode = va_arg(args, int);
va_end(args);
}