WebAssembly/wasi-libc

-Werror should probably not be passed by default

glandium opened this issue · 1 comments

We have jobs to build wasi-libc/wasi-sdk with clang/llvm trunk. (that's why you see me regularly add filters for new defines).

This time, a new warning was added on clang trunk, and it catches existing problems, which -Werror turns into errors.

For example:

libc-bottom-half/cloudlibc/src/libc/poll/poll.c:53:25: error: missing field 'precision' initializer [-Werror,-Wmissing-field-initializers]
   53 |         .u.u.clock.id = __WASI_CLOCKID_REALTIME,
      |                         ^
/builds/worker/fetches/wasi-sdk/build/install/wasi/share/wasi-sysroot/include/wasi/api.h:79:45: note: expanded from macro '__WASI_CLOCKID_REALTIME'
   79 | #define __WASI_CLOCKID_REALTIME (UINT32_C(0))
      |                                             ^
libc-bottom-half/cloudlibc/src/libc/poll/poll.c:53:25: error: missing field 'flags' initializer [-Werror,-Wmissing-field-initializers]
/builds/worker/fetches/wasi-sdk/build/install/wasi/share/wasi-sysroot/include/wasi/api.h:79:45: note: expanded from macro '__WASI_CLOCKID_REALTIME'
   79 | #define __WASI_CLOCKID_REALTIME (UINT32_C(0))
      |                                             ^
2 errors generated.

I feel like -Werror shouldn't be set by default.

sbc100 commented

New clang warnings come along fairly rarely, don't they? I think we can just fix them or add -Wno-missing-field-initializers when we find these issues?