tools/nolibc: open: fix up compile warning for arm
authorZhangjin Wu <falcon@tinylab.org>
Sat, 3 Jun 2023 08:11:57 +0000 (16:11 +0800)
committerPaul E. McKenney <paulmck@kernel.org>
Fri, 9 Jun 2023 18:46:10 +0000 (11:46 -0700)
commitf62ec079d0899331085ff3537848e55cc316d751
tree3b70ca542d8f923704ec81fb441fec831e877a76
parent646ff7c7edaade6b1ea81fa2e132c52a346bba39
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 <falcon@tinylab.org>
Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/include/nolibc/sys.h