Initialize variable before use

This commit is contained in:
Shahram Najm 2016-02-11 11:33:59 +00:00
parent 3f8f22cc40
commit 16c9ee8011
1 changed files with 3 additions and 3 deletions

View File

@ -163,7 +163,7 @@ static int test_bit(long a, long b) {return a&(1<<b);}
static void dump_bits(grib_dumper* d,grib_accessor* a,const char* comment)
{
grib_dumper_debug *self = (grib_dumper_debug*)d;
long value; size_t size = 1;
long value=0; size_t size = 1;
int err = grib_unpack_long(a,&value,&size);
int i;
@ -198,7 +198,7 @@ static void dump_bits(grib_dumper* d,grib_accessor* a,const char* comment)
static void dump_double(grib_dumper* d,grib_accessor* a,const char* comment)
{
grib_dumper_debug *self = (grib_dumper_debug*)d;
double value; size_t size = 1;
double value=0; size_t size = 1;
int err = grib_unpack_double(a,&value,&size);
int i;
@ -244,7 +244,7 @@ static void dump_string(grib_dumper* d,grib_accessor* a,const char* comment)
p=value;
if( a->length == 0 && (d->option_flags & GRIB_DUMP_FLAG_CODED) != 0)
if( a->length == 0 && (d->option_flags & GRIB_DUMP_FLAG_CODED) != 0)
return;
set_begin_end(d,a);