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>
This commit is contained in:
Lubomir I. Ivanov 2017-03-11 22:08:31 +02:00 committed by Dirk Hohndel
parent f47dc5c720
commit bcad5ddd38
12 changed files with 24 additions and 0 deletions

View file

@ -1,5 +1,7 @@
#ifdef __clang__
// Clang has a bug on zero-initialization of C structs.
#pragma clang diagnostic ignored "-Wmissing-field-initializers"
#endif
#include <stdlib.h>
#include <stdio.h>

View file

@ -1,5 +1,7 @@
#ifdef __clang__
// Clang has a bug on zero-initialization of C structs.
#pragma clang diagnostic ignored "-Wmissing-field-initializers"
#endif
#include <stdlib.h>
#include <stdio.h>

View file

@ -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>

View file

@ -1,5 +1,7 @@
#ifdef __clang__
// Clang has a bug on zero-initialization of C structs.
#pragma clang diagnostic ignored "-Wmissing-field-initializers"
#endif
#include <stdio.h>
#include <ctype.h>

View file

@ -1,5 +1,7 @@
#ifdef __clang__
// Clang has a bug on zero-initialization of C structs.
#pragma clang diagnostic ignored "-Wmissing-field-initializers"
#endif
#include <stdio.h>
#include <unistd.h>

View file

@ -1,5 +1,7 @@
#ifdef __clang__
// Clang has a bug on zero-initialization of C structs.
#pragma clang diagnostic ignored "-Wmissing-field-initializers"
#endif
#include <stdio.h>
#include <ctype.h>

View file

@ -1,5 +1,7 @@
#ifdef __clang__
// Clang has a bug on zero-initialization of C structs.
#pragma clang diagnostic ignored "-Wmissing-field-initializers"
#endif
#include <stdarg.h>
#include <stdlib.h>

View file

@ -1,5 +1,7 @@
#ifdef __clang__
// Clang has a bug on zero-initialization of C structs.
#pragma clang diagnostic ignored "-Wmissing-field-initializers"
#endif
#include <stdio.h>
#include <ctype.h>

View file

@ -1,5 +1,7 @@
#ifdef __clang__
// Clang has a bug on zero-initialization of C structs.
#pragma clang diagnostic ignored "-Wmissing-field-initializers"
#endif
#include <stdio.h>
#include <ctype.h>

View file

@ -1,5 +1,7 @@
#ifdef __clang__
// Clang has a bug on zero-initialization of C structs.
#pragma clang diagnostic ignored "-Wmissing-field-initializers"
#endif
#include "save-html.h"
#include "qthelperfromc.h"

View file

@ -1,5 +1,7 @@
#ifdef __clang__
// Clang has a bug on zero-initialization of C structs.
#pragma clang diagnostic ignored "-Wmissing-field-initializers"
#endif
#include <stdio.h>
#include <ctype.h>

View file

@ -1,5 +1,7 @@
#ifdef __clang__
// Clang has a bug on zero-initialization of C structs.
#pragma clang diagnostic ignored "-Wmissing-field-initializers"
#endif
#include <stdarg.h>
#include <stdlib.h>