Compiler warnings

This commit is contained in:
Shahram Najm 2022-03-12 18:58:24 +00:00
parent ccb1f1d6aa
commit 6d0b83ae17
2 changed files with 7 additions and 7 deletions

View File

@ -28,7 +28,7 @@ int exit_on_error = 1; /* By default exit if any check fails */
int verbose = 0; /* By default quiet unless errors */
int error_count = 0;
int DBL_EQUAL(double d1, double d2, double tolerance)
static int DBL_EQUAL(double d1, double d2, double tolerance)
{
return fabs(d1 - d2) <= tolerance;
}
@ -46,7 +46,7 @@ static void usage(const char* prog)
}
/* Print an error message and optionally die */
void error(const char* filename, int msg_num, const char* fmt, ...)
static void error(const char* filename, int msg_num, const char* fmt, ...)
{
char buf[1024] = {0,};
va_list list;
@ -64,7 +64,7 @@ void error(const char* filename, int msg_num, const char* fmt, ...)
}
}
double get_precision(long edition)
static double get_precision(long edition)
{
if (edition == 1)
return 1.0 / 1000.0; /* milli degrees */
@ -74,7 +74,7 @@ double get_precision(long edition)
return 0.0;
}
int process_file(const char* filename)
static int process_file(const char* filename)
{
int err = 0, msg_num = 0;
grib_handle* h = NULL;

View File

@ -12,7 +12,7 @@
typedef void (*getproc)(FILE*, grib_handle*, const char*, const char*);
void get_long(FILE* f, grib_handle* h, const char* name, const char* arg)
static void get_long(FILE* f, grib_handle* h, const char* name, const char* arg)
{
const char* key = arg ? arg : name;
long value;
@ -20,7 +20,7 @@ void get_long(FILE* f, grib_handle* h, const char* name, const char* arg)
fprintf(f, "\"%s\":%ld\n", name, value);
}
void get_param(FILE* f, grib_handle* h, const char* name, const char* arg)
static void get_param(FILE* f, grib_handle* h, const char* name, const char* arg)
{
const char* key = "indicatorOfParameter";
long value;
@ -28,7 +28,7 @@ void get_param(FILE* f, grib_handle* h, const char* name, const char* arg)
fprintf(f, "\"%s\":%ld\n", name, value - 131 + 2);
}
void get_iso_ref_date(FILE* f, grib_handle* h, const char* name, const char* arg)
static void get_iso_ref_date(FILE* f, grib_handle* h, const char* name, const char* arg)
{
long year;
long month;