diff --git a/tests/grib_lam_bf.cc b/tests/grib_lam_bf.cc index c7170a192..7a575e68c 100644 --- a/tests/grib_lam_bf.cc +++ b/tests/grib_lam_bf.cc @@ -860,7 +860,7 @@ int main(int argc, char* argv[]) geometry_len = 128; GRIB_CHECK(grib_get_string(h, "gridType", geometry, &geometry_len), 0); if (strcmp(geometry, grids[igrid])) { - printf("Geometry is incorrect\n"); + fprintf(stderr, "Geometry is incorrect\n"); return 1; } diff --git a/tests/unit_tests.cc b/tests/unit_tests.cc index 688e4f104..eedafca1b 100644 --- a/tests/unit_tests.cc +++ b/tests/unit_tests.cc @@ -225,7 +225,6 @@ static void test_assertion_catching() char empty[] = ""; char** list = NULL; - int i = 0; Assert(assertion_caught == 0); codes_set_codes_assertion_failed_proc(&my_assertion_proc); @@ -265,6 +264,16 @@ static void test_logging_proc() Assert(logging_caught == 0); } +static void my_print_proc(const grib_context* c, void* descriptor, const char* mesg) +{ +} +static void test_print_proc() +{ + grib_context* context = grib_context_get_default(); + grib_context_set_print_proc(context, my_print_proc); + grib_context_set_print_proc(context, NULL); +} + static void test_concept_condition_strings() { printf("Running %s ...\n", __func__); @@ -788,6 +797,7 @@ int main(int argc, char** argv) test_scale_factor_scaled_values(); test_dates(); test_logging_proc(); + test_print_proc(); test_grib_binary_search(); test_parse_keyval_string();