diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2017-03-11 22:08:31 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-03-12 09:18:59 -0700 |
commit | bcad5ddd38c5184910844d718ca3bb4bae50c47d (patch) | |
tree | 562f38156218e14064b81c9c37870ed476c96d7e /core/equipment.c | |
parent | f47dc5c72090a3a94c688be7de0be8ab4c277750 (diff) | |
download | subsurface-bcad5ddd38c5184910844d718ca3bb4bae50c47d.tar.gz |
Only enable -Wmissing-field-initializers for Clang
The following pragma is Clang specific:
It produces a warning:
warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
Only enable it for Clang by checking the __clang__ macro.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/equipment.c')
-rw-r--r-- | core/equipment.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/equipment.c b/core/equipment.c index 0d4ab5571..19b50ab69 100644 --- a/core/equipment.c +++ b/core/equipment.c @@ -1,5 +1,7 @@ +#ifdef __clang__ // Clang has a bug on zero-initialization of C structs. #pragma clang diagnostic ignored "-Wmissing-field-initializers" +#endif /* equipment.c */ #include <stdio.h> |