From 4f506043f5b5bcd954cb35a2bc4c54a957b33b5c Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Sat, 6 Jun 2020 17:46:47 +0100 Subject: [PATCH] Reformatting --- src/grib_accessor_class_proj_string.c | 14 +++++++------- src/grib_expression_class_sub_string.c | 4 ++-- src/grib_index.c | 2 +- tests/lsan-leap42.supp | 2 ++ 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/grib_accessor_class_proj_string.c b/src/grib_accessor_class_proj_string.c index 0c91a9c6b..52b44cc97 100644 --- a/src/grib_accessor_class_proj_string.c +++ b/src/grib_accessor_class_proj_string.c @@ -175,7 +175,7 @@ static int get_major_minor_axes(grib_handle* h, double* pMajor, double* pMinor) /* Caller must have allocated enough space in the 'result' argument */ static int get_earth_shape(grib_handle* h, char* result) { - int err = 0; + int err = 0; double major = 0, minor = 0; if ((err = get_major_minor_axes(h, &major, &minor)) != GRIB_SUCCESS) return err; @@ -188,7 +188,7 @@ static int get_earth_shape(grib_handle* h, char* result) static int proj_regular_latlon(grib_handle* h, char* result) { - int err = 0; + int err = 0; char shape[64] = {0,}; if ((err = get_earth_shape(h, shape)) != GRIB_SUCCESS) return err; @@ -198,7 +198,7 @@ static int proj_regular_latlon(grib_handle* h, char* result) static int proj_lambert_conformal(grib_handle* h, char* result) { - int err = 0; + int err = 0; char shape[64] = {0,}; double LoVInDegrees = 0, LaDInDegrees = 0, Latin1InDegrees = 0, Latin2InDegrees = 0; @@ -219,7 +219,7 @@ static int proj_lambert_conformal(grib_handle* h, char* result) static int proj_lambert_azimuthal_equal_area(grib_handle* h, char* result) { - int err = 0; + int err = 0; char shape[64] = {0,}; double standardParallel = 0, centralLongitude = 0; @@ -236,11 +236,11 @@ static int proj_lambert_azimuthal_equal_area(grib_handle* h, char* result) static int proj_polar_stereographic(grib_handle* h, char* result) { - int err = 0; + int err = 0; double centralLongitude = 0, centralLatitude = 0; int has_northPole = 0; long projectionCentreFlag = 0; - char shape[64] = {0,}; + char shape[64] = {0,}; if ((err = get_earth_shape(h, shape)) != GRIB_SUCCESS) return err; @@ -260,7 +260,7 @@ static int proj_mercator(grib_handle* h, char* result) { int err = 0; double LaDInDegrees = 0; - char shape[64] = {0,}; + char shape[64] = {0,}; if ((err = grib_get_double_internal(h, "LaDInDegrees", &LaDInDegrees)) != GRIB_SUCCESS) return err; diff --git a/src/grib_expression_class_sub_string.c b/src/grib_expression_class_sub_string.c index 0e441cc93..1b437fa05 100644 --- a/src/grib_expression_class_sub_string.c +++ b/src/grib_expression_class_sub_string.c @@ -111,7 +111,7 @@ grib_expression* new_sub_string_expression(grib_context* c, const char* value, s { char v[1024] = {0,}; grib_expression_sub_string* e = (grib_expression_sub_string*)grib_context_malloc_clear_persistent(c, sizeof(grib_expression_sub_string)); - const size_t slen = strlen(value); + const size_t slen = strlen(value); /* if (start<0) start+=strlen(value); */ if (length == 0) { @@ -123,7 +123,7 @@ grib_expression* new_sub_string_expression(grib_context* c, const char* value, s return NULL; } if (start + length > slen) { - grib_context_log(c, GRIB_LOG_ERROR, "Invalid substring: start(=%lu)+length(=%lu) > length('%s'))",start, length,value); + grib_context_log(c, GRIB_LOG_ERROR, "Invalid substring: start(=%lu)+length(=%lu) > length('%s'))", start, length, value); return NULL; } diff --git a/src/grib_index.c b/src/grib_index.c index dcf611094..4fd0cb2cc 100644 --- a/src/grib_index.c +++ b/src/grib_index.c @@ -1782,7 +1782,7 @@ int grib_index_dump_file(FILE* fout, const char* filename) return err; f = file; while (f) { - grib_file *prev = f; + grib_file* prev = f; fprintf(fout, "GRIB File: %s\n", f->name); grib_context_free(c, f->name); f = f->next; diff --git a/tests/lsan-leap42.supp b/tests/lsan-leap42.supp index 640d0d9d2..48b5278e3 100644 --- a/tests/lsan-leap42.supp +++ b/tests/lsan-leap42.supp @@ -1,5 +1,7 @@ leak:tools/grib_filter.c leak:tools/bufr_filter.c +leak:tools/bufr_dump.c +leak:tools/bufr_compare.c leak:tools/gts_filter.c leak:src/action_class_rename.c leak:tools/grib_to_netcdf.c