From 6e253fa04f81be6fb26ff59cd5be39c85bfe3d19 Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Tue, 22 May 2018 08:29:42 +0200 Subject: [PATCH] core/ssrf.h: add #pragma to avoid clang warning "-Wmissing-field-initializers" Add a #pragma to avoid getting warning when a struct is only initialized with one 0 and not one pr struct member Signed-off-by: Jan Iversen --- core/ssrf.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/ssrf.h b/core/ssrf.h index a07436d80..7f65f2dc5 100644 --- a/core/ssrf.h +++ b/core/ssrf.h @@ -6,6 +6,10 @@ extern "C" { #endif +#ifdef __clang__ +// Clang has a bug on zero-initialization of C structs. +#pragma clang diagnostic ignored "-Wmissing-field-initializers" +#endif #ifdef __cplusplus }