Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-Werror should probably not be passed by default #453

Open
glandium opened this issue Dec 14, 2023 · 1 comment
Open

-Werror should probably not be passed by default #453

glandium opened this issue Dec 14, 2023 · 1 comment

Comments

@glandium
Copy link
Contributor

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
Copy link
Member

sbc100 commented Dec 14, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants