• Nanyong Sun's avatar
    riscv: syscall_table: Reduce W=1 compilation warnings noise · a6a58ecf
    Nanyong Sun authored
    Building riscv syscall table with W=1 throws the warning as
    following pattern:
    arch/riscv/kernel/syscall_table.c:14:36: warning: initialized field overwritten [-Woverride-init]
       14 | #define __SYSCALL(nr, call) [nr] = (call),
          |                                    ^
    ./include/uapi/asm-generic/unistd.h:29:37: note: in expansion of macro ‘__SYSCALL’
       29 | #define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _sys)
          |                                     ^~~~~~~~~
    ./include/uapi/asm-generic/unistd.h:34:1: note: in expansion of macro ‘__SC_COMP’
       34 | __SC_COMP(__NR_io_setup, sys_io_setup, compat_sys_io_setup)
          | ^~~~~~~~~
    arch/riscv/kernel/syscall_table.c:14:36: note: (near initialization for ‘sys_call_table[0]’)
       14 | #define __SYSCALL(nr, call) [nr] = (call),
          |                                    ^
    ./include/uapi/asm-generic/unistd.h:29:37: note: in expansion of macro ‘__SYSCALL’
       29 | #define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _sys)
          |                                     ^~~~~~~~~
    ./include/uapi/asm-generic/unistd.h:34:1: note: in expansion of macro ‘__SC_COMP’
       34 | __SC_COMP(__NR_io_setup, sys_io_setup, compat_sys_io_setup)
          | ^~~~~~~~~
    arch/riscv/kernel/syscall_table.c:14:36: warning: initialized field overwritten [-Woverride-init]
    ...
    
    Since we intentionally build the syscall tables this way,ignore the warning.
    Reported-by: default avatarHulk Robot <hulkci@huawei.com>
    Signed-off-by: default avatarNanyong Sun <sunnanyong@huawei.com>
    Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
    a6a58ecf
Makefile 1.47 KB