From da87c07f2a91cdb8064770ce0408c90a53ff75a5 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Mon, 4 Jul 2016 16:22:47 +0100 Subject: [PATCH 1/3] Compiler warning: grib_is_missing_string expects unsigned char * --- src/grib_dumper_class_filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/grib_dumper_class_filter.c b/src/grib_dumper_class_filter.c index 3bb8e32b0..b3183ea85 100644 --- a/src/grib_dumper_class_filter.c +++ b/src/grib_dumper_class_filter.c @@ -450,7 +450,7 @@ static void dump_string(grib_dumper* d,grib_accessor* a,const char* comment) err = grib_unpack_string(a,value,&size); p=value; r=get_key_rank(h,self->keys,a->name); - if (grib_is_missing_string(a,value,size)) + if (grib_is_missing_string(a,(unsigned char *)value,size)) return; while(*p) { if(!isprint(*p)) *p = '.'; p++; } From dd080f0be3c3c90ebb47b0abf3d93ac779df2b44 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Mon, 4 Jul 2016 17:18:59 +0100 Subject: [PATCH 2/3] ECC-286: bufr_filter not able to set keys names starting with a number --- tests/CMakeLists.txt | 1 + tests/ecc-286.sh | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100755 tests/ecc-286.sh diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6390fa971..527941f75 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -56,6 +56,7 @@ list( APPEND tests2 bufr_ls bufr_change_edition ecc-197 + ecc-286 gts_get gts_ls gts_compare diff --git a/tests/ecc-286.sh b/tests/ecc-286.sh new file mode 100755 index 000000000..391d8998c --- /dev/null +++ b/tests/ecc-286.sh @@ -0,0 +1,41 @@ +#!/bin/sh +# Copyright 2005-2016 ECMWF. +# +# This software is licensed under the terms of the Apache Licence Version 2.0 +# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. +# +# 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.sh + +# --------------------------------------------------------- +# This is the test for the JIRA issue ECC-286. +# It tests setting a key which starts with a digit +# --------------------------------------------------------- +cd ${data_dir}/bufr +label="ecc_286_test" + +tempRules=temp.${label}.filter +tempOut=temp.${label}.out +tempRef=temp.${label}.ref +BufrFile=syno_1.bufr + +cat > $tempRules < $tempOut + +cat > $tempRef < Date: Mon, 4 Jul 2016 18:12:51 +0100 Subject: [PATCH 3/3] Tests: reduce verbosity --- tests/bufr_dump.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/bufr_dump.sh b/tests/bufr_dump.sh index defeac83d..b0425bb31 100755 --- a/tests/bufr_dump.sh +++ b/tests/bufr_dump.sh @@ -30,7 +30,7 @@ REDIRECT=/dev/null for file in ${bufr_files} do - ${tools_dir}bufr_dump -O ${data_dir}/bufr/$file + ${tools_dir}bufr_dump -O ${data_dir}/bufr/$file >/dev/null done #==============================================