From d493d658136f6928d66629413eea8ec84c2cc5e5 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Sat, 13 Jan 2024 18:27:19 +0000 Subject: [PATCH] Tools: Dead code removal --- tools/gts_compare.cc | 10 ++++------ tools/metar_compare.cc | 10 +++++----- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/tools/gts_compare.cc b/tools/gts_compare.cc index b7692f65a..5a748ff98 100644 --- a/tools/gts_compare.cc +++ b/tools/gts_compare.cc @@ -450,11 +450,11 @@ static int compare_values(const grib_runtime_options* options, grib_handle* h1, return err; } - if (options->mode != MODE_GTS) { + //if (options->mode != MODE_GTS) { /* TODO: Ignore missing values for keys in GTS. Not yet implemented */ - isMissing1 = ((grib_is_missing(h1, name, &err1) == 1) && (err1 == 0)) ? 1 : 0; - isMissing2 = ((grib_is_missing(h2, name, &err2) == 1) && (err2 == 0)) ? 1 : 0; - } + //isMissing1 = ((grib_is_missing(h1, name, &err1) == 1) && (err1 == 0)) ? 1 : 0; + //isMissing2 = ((grib_is_missing(h2, name, &err2) == 1) && (err2 == 0)) ? 1 : 0; + //} if ((isMissing1 == 1) && (isMissing2 == 1)) { if (verbose) @@ -583,7 +583,6 @@ static int compare_values(const grib_runtime_options* options, grib_handle* h1, break; case GRIB_TYPE_BYTES: - if (verbose) printf(" as bytes\n"); if (options->mode == MODE_GTS) { // We do not want to compare the message itself return 0; @@ -591,7 +590,6 @@ static int compare_values(const grib_runtime_options* options, grib_handle* h1, break; case GRIB_TYPE_LABEL: - if (verbose) printf(" as label\n"); break; default: diff --git a/tools/metar_compare.cc b/tools/metar_compare.cc index 7b67c7004..d78b8369c 100644 --- a/tools/metar_compare.cc +++ b/tools/metar_compare.cc @@ -523,11 +523,11 @@ static int compare_values(const grib_runtime_options* options, grib_handle* h1, return err; } - if (options->mode != MODE_METAR) { - /* TODO: Ignore missing values for keys in METAR. Not yet implemented */ - isMissing1 = ((grib_is_missing(h1, name, &err1) == 1) && (err1 == 0)) ? 1 : 0; - isMissing2 = ((grib_is_missing(h2, name, &err2) == 1) && (err2 == 0)) ? 1 : 0; - } + // if (options->mode != MODE_METAR) { + // // TODO: Ignore missing values for keys in METAR. Not yet implemented + // isMissing1 = ((grib_is_missing(h1, name, &err1) == 1) && (err1 == 0)) ? 1 : 0; + // isMissing2 = ((grib_is_missing(h2, name, &err2) == 1) && (err2 == 0)) ? 1 : 0; + // } if ((isMissing1 == 1) && (isMissing2 == 1)) { if (verbose)