From f952d632c48ad0ff57677ef40a37f0782b1394bc Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 9 Jun 2020 13:21:21 +0100 Subject: [PATCH] Clang: Include what you use --- examples/C/grib_keys_iterator.c | 3 --- src/grib_accessor_class_from_scale_factor_scaled_value.c | 2 +- tests/grib_encode_pthreads.c | 1 - tests/grib_multi_from_message.c | 3 --- tests/grib_sh_ieee64.c | 2 +- tigge/tigge_name.c | 1 - tigge/tigge_split.c | 1 - tigge/tigge_tools.c | 2 -- 8 files changed, 2 insertions(+), 13 deletions(-) diff --git a/examples/C/grib_keys_iterator.c b/examples/C/grib_keys_iterator.c index 62a71f8a8..c4de118b2 100644 --- a/examples/C/grib_keys_iterator.c +++ b/examples/C/grib_keys_iterator.c @@ -22,9 +22,6 @@ #include #include -#if !(defined(_WIN32) && defined(_MSC_VER)) -#include -#endif #include "eccodes.h" diff --git a/src/grib_accessor_class_from_scale_factor_scaled_value.c b/src/grib_accessor_class_from_scale_factor_scaled_value.c index 96e47a391..3374b6912 100644 --- a/src/grib_accessor_class_from_scale_factor_scaled_value.c +++ b/src/grib_accessor_class_from_scale_factor_scaled_value.c @@ -15,7 +15,7 @@ #include "grib_api_internal.h" #include -#include + /* This is used by make_class.pl diff --git a/tests/grib_encode_pthreads.c b/tests/grib_encode_pthreads.c index 0fe2460d6..51eb49953 100644 --- a/tests/grib_encode_pthreads.c +++ b/tests/grib_encode_pthreads.c @@ -9,7 +9,6 @@ */ #include #include -#include #include #include #include "grib_api.h" diff --git a/tests/grib_multi_from_message.c b/tests/grib_multi_from_message.c index 89eba9be4..9613c67d8 100644 --- a/tests/grib_multi_from_message.c +++ b/tests/grib_multi_from_message.c @@ -15,9 +15,6 @@ #include "grib_api_internal.h" #include -#ifndef ECCODES_ON_WINDOWS -#include -#endif static void usage(const char* prog) { diff --git a/tests/grib_sh_ieee64.c b/tests/grib_sh_ieee64.c index 0adb16082..f925551ca 100644 --- a/tests/grib_sh_ieee64.c +++ b/tests/grib_sh_ieee64.c @@ -7,7 +7,7 @@ * In applying this licence, ECMWF does not waive the privileges and immunities granted to it by * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ -#include + #include #include diff --git a/tigge/tigge_name.c b/tigge/tigge_name.c index 44bc58430..40e004236 100755 --- a/tigge/tigge_name.c +++ b/tigge/tigge_name.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include "tigge_tools.h" diff --git a/tigge/tigge_split.c b/tigge/tigge_split.c index 8900962c3..c903969d4 100755 --- a/tigge/tigge_split.c +++ b/tigge/tigge_split.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #ifndef ECCODES_ON_WINDOWS diff --git a/tigge/tigge_tools.c b/tigge/tigge_tools.c index 237d2b1ae..6115d1d9e 100644 --- a/tigge/tigge_tools.c +++ b/tigge/tigge_tools.c @@ -15,8 +15,6 @@ #include "tigge_tools.h" #include "eccodes_windef.h" -#include - #ifndef ECCODES_ON_WINDOWS #include #else