Fix includes: IWYU

This commit is contained in:
Shahram Najm 2019-11-07 12:03:45 +00:00
parent a596323c74
commit 2743b6f524
51 changed files with 17 additions and 90 deletions

View File

@ -17,7 +17,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "eccodes.h"

View File

@ -16,7 +16,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "eccodes.h"

View File

@ -18,7 +18,6 @@
*
*/
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

View File

@ -15,7 +15,6 @@
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "eccodes.h"

View File

@ -18,7 +18,6 @@
*
*/
#include <stdio.h>
#include <stdlib.h>
#include "eccodes.h"

View File

@ -16,7 +16,6 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "eccodes.h"
static void usage(const char* prog) {

View File

@ -15,7 +15,6 @@
*
*/
#include <stdio.h>
#include <stdlib.h>
#include "eccodes.h"

View File

@ -18,7 +18,6 @@
*
*/
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>

View File

@ -15,9 +15,11 @@
# include <sys/types.h>
#endif
/*
#if HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
*/
#ifdef HAVE_FCNTL_H
# include <fcntl.h>

View File

@ -13,7 +13,6 @@
****************************************/
#include "grib_api_internal.h"
#include <ctype.h>
/*
This is used by make_class.pl

View File

@ -13,7 +13,6 @@
****************************************/
#include "grib_api_internal.h"
#include <ctype.h>
#if GRIB_PTHREADS
static pthread_once_t once = PTHREAD_ONCE_INIT;

View File

@ -8,12 +8,7 @@
* virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
*/
/*****************************************
* Enrico Fucile
****************************************/
#include "grib_api_internal.h"
#include <ctype.h>
/*
This is used by make_class.pl

View File

@ -8,12 +8,7 @@
* virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
*/
/*****************************************
* Enrico Fucile
****************************************/
#include "grib_api_internal.h"
#include <ctype.h>
/*
This is used by make_class.pl

View File

@ -9,7 +9,7 @@
*/
#include "grib_api_internal.h"
#include <math.h>
/*
This is used by make_class.pl

View File

@ -13,7 +13,6 @@
*******************************/
#include "grib_api_internal.h"
#include "grib_accessor_class.h"
#include "grib_optimize_decimal_factor.h"
#include <math.h>

View File

@ -9,7 +9,7 @@
*/
#include "grib_api_internal.h"
#include <math.h>
/*
This is used by make_class.pl

View File

@ -8,12 +8,7 @@
* virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
*/
/*****************************************
* Enrico Fucile
****************************************/
#include "grib_api_internal.h"
#include <ctype.h>
/*
This is used by make_class.pl

View File

@ -8,12 +8,8 @@
* virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
*/
/*************************************************
* Enrico Fucile
***********************************************/
#include "grib_api_internal.h"
#include <math.h>
/*
This is used by make_class.pl

View File

@ -8,12 +8,8 @@
* virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
*/
/*************************************************
* Enrico Fucile
***********************************************/
#include "grib_api_internal.h"
#include <math.h>
/*
This is used by make_class.pl

View File

@ -8,12 +8,7 @@
* virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
*/
/*****************************************
* Enrico Fucile
****************************************/
#include "grib_api_internal.h"
#include <ctype.h>
/*
This is used by make_class.pl

View File

@ -8,12 +8,7 @@
* virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
*/
/*****************************************
* Enrico Fucile
****************************************/
#include "grib_api_internal.h"
#include <ctype.h>
/*
This is used by make_class.pl

View File

@ -9,7 +9,7 @@
*/
#include "grib_api_internal.h"
#include <limits.h>
/*
This is used by make_class.pl

View File

@ -8,12 +8,7 @@
* virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
*/
/*****************************************
* Enrico Fucile
****************************************/
#include "grib_api_internal.h"
#include <ctype.h>
/*
This is used by make_class.pl

View File

@ -1,3 +1 @@
#include "grib_api_internal.h"
const char * grib_get_git_sha1() { return ""; }

View File

@ -9,7 +9,7 @@
*/
#include "grib_api_internal.h"
#include <ctype.h>
/*
This is used by make_class.pl

View File

@ -8,7 +8,6 @@
* virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
*/
#include <stdarg.h>
#include "grib_api_internal.h"
int grib_expression_native_type(grib_handle* h,grib_expression* g)

View File

@ -8,7 +8,7 @@
* virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
*/
#include "grib_api_internal.h"
#include <float.h>
/*
* C Implementation: gaussian_reduced

View File

@ -16,7 +16,6 @@
#include "grib_api_internal.h"
#include <math.h>
#include <errno.h>
#include <signal.h>
#include <ctype.h>
#include <stdlib.h>

View File

@ -14,7 +14,6 @@
#include "grib_api_internal.h"
#include <float.h>
#include <math.h>
/*

View File

@ -13,7 +13,6 @@
#include <math.h>
#include <float.h>
#include <string.h>
#include <stdlib.h>
static double epsilon()
{

View File

@ -9,7 +9,6 @@
*/
#include "eccodes.h"
#include <assert.h>
static const char* not_found = "not_found";
@ -38,7 +37,7 @@ int main(int argc, char* argv[])
char *filename, *keys;
int i, err = 0;
int num_messages = 0;
codes_bufr_header* headers = NULL;
codes_bufr_header* header_array = NULL;
codes_context* c = codes_context_get_default();
if (argc != 3) return 1;
@ -46,11 +45,11 @@ int main(int argc, char* argv[])
keys = argv[1]; /* comma-separated like bufr_ls/bufr_get */
filename = argv[2];
err = codes_bufr_extract_headers_malloc(c, filename, &headers, &num_messages);
err = codes_bufr_extract_headers_malloc(c, filename, &header_array, &num_messages);
if (err) return 1;
for (i=0; i < num_messages; ++i) {
codes_bufr_header bh = headers[i];
codes_bufr_header bh = header_array[i];
/*
* Mimic the behaviour of bufr_get -f -p keys for testing
*/
@ -113,7 +112,7 @@ int main(int argc, char* argv[])
printf("\n");
}
free(headers);
free(header_array);
return 0;
}

View File

@ -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 "grib_api_internal.h"
#include "eccodes.h"
#include <assert.h>

View File

@ -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 "grib_api_internal.h"
#include "eccodes.h"
#include <assert.h>

View File

@ -9,7 +9,6 @@
*/
#include "grib_api.h"
#include "math.h"
static void usage(char* prog) {
printf("usage: %s file1.grib file2.grib\n",prog);

View File

@ -13,7 +13,6 @@
*
*/
#include <stdio.h>
#include <assert.h>
#include "grib_api_internal.h"
static void usage(const char* prog) {

View File

@ -3,7 +3,6 @@
*/
#include <time.h>
#include <pthread.h>
#include <assert.h>
#include <unistd.h>
#include "grib_api.h"

View File

@ -11,7 +11,6 @@
#include <stdlib.h>
#include <time.h>
#include <pthread.h>
#include <string.h>
#include <assert.h>
#include "grib_api.h"

View File

@ -13,7 +13,6 @@
*/
#include "grib_api.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <assert.h>

View File

@ -8,8 +8,6 @@
* virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
*/
#include <assert.h>
#include "grib_api.h"
/*

View File

@ -8,7 +8,6 @@
* virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
*/
#include <stdlib.h>
#include <math.h>
#include <stdio.h>
#include <string.h>

View File

@ -11,7 +11,6 @@
#include "grib_api_internal.h"
#include "eccodes.h"
#include <assert.h>
#include <float.h>
#define STR_EQUAL(s1, s2) (strcmp((s1), (s2)) == 0)

View File

@ -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 "grib_api_internal.h"
#include "grib_api.h"
static void usage (const char *prog)
{

View File

@ -19,7 +19,6 @@
#endif
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include "grib_api.h"

View File

@ -27,9 +27,7 @@
#include <sys/types.h>
#include "tigge_tools.h"
#ifndef ECCODES_ON_WINDOWS
#include <dirent.h>
#else
#ifdef ECCODES_ON_WINDOWS
#include <direct.h>
#include <io.h>
#endif

View File

@ -27,7 +27,6 @@
#include <sys/types.h>
#ifndef ECCODES_ON_WINDOWS
#include <dirent.h>
#include <unistd.h>
#else
#include <direct.h>

View File

@ -15,7 +15,6 @@
#include "tigge_tools.h"
#include "eccodes_windef.h"
#include <stdlib.h>
#include <sys/types.h>
#ifndef ECCODES_ON_WINDOWS

View File

@ -16,7 +16,6 @@
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "grib_api.h"

View File

@ -17,7 +17,6 @@
*/
#include "grib_api_internal.h"
#include <assert.h>
static int verbose = 0;
static const char* OUTPUT_FILENAME_DEFAULT = "split_rdbSubtype.undef.bufr";

View File

@ -9,7 +9,6 @@
*/
#include "grib_api.h"
#include "math.h"
static void usage(char* prog) {
printf("Usage: %s file1.grib file2.grib\n",prog);

View File

@ -18,7 +18,6 @@
#include <ctype.h>
#include <time.h>
#include <limits.h>
#include <float.h>
#include <netcdf.h>

View File

@ -17,7 +17,6 @@
#ifndef ECCODES_ON_WINDOWS
# include <unistd.h>
#endif
#include <string.h>
#ifndef GRIB_TOOLS_H
#define GRIB_TOOLS_H