diff --git a/examples/gf_example_2.c b/examples/gf_example_2.c index e98774a..576d9a5 100644 --- a/examples/gf_example_2.c +++ b/examples/gf_example_2.c @@ -28,8 +28,8 @@ int main(int argc, char **argv) { uint32_t a, b, c; uint8_t *r1, *r2; - uint16_t *r16; - uint32_t *r32; + uint16_t *r16 = NULL; + uint32_t *r32 = NULL; int w, i; gf_t gf; diff --git a/src/gf.c b/src/gf.c index c14f03e..5a71ad6 100644 --- a/src/gf.c +++ b/src/gf.c @@ -767,7 +767,7 @@ void gf_set_region_data(gf_region_data *rd, int xor, int align) { - gf_internal_t *h; + gf_internal_t *h = NULL; int wb; uint32_t a; unsigned long uls, uld; diff --git a/src/gf_w8.c b/src/gf_w8.c index b171639..44c42a5 100644 --- a/src/gf_w8.c +++ b/src/gf_w8.c @@ -799,9 +799,9 @@ gf_w8_logzero_multiply_region(gf_t *gf, void *src, void *dest, uint32_t val, int int gf_w8_log_init(gf_t *gf) { gf_internal_t *h; - struct gf_w8_logtable_data *ltd; - struct gf_w8_logzero_table_data *ztd; - struct gf_w8_logzero_small_table_data *std; + struct gf_w8_logtable_data *ltd = NULL; + struct gf_w8_logzero_table_data *ztd = NULL; + struct gf_w8_logzero_small_table_data *std = NULL; uint8_t *alt; uint8_t *inv; int i, b; diff --git a/test/gf_unit.c b/test/gf_unit.c index cf466fe..22d4905 100644 --- a/test/gf_unit.c +++ b/test/gf_unit.c @@ -80,6 +80,9 @@ int main(int argc, char **argv) uint16_t a16, b16, c16, d16, *log16, *alog16; char as[50], bs[50], cs[50], ds[50], ais[50], bis[50]; uint32_t mask; + uint8_t a8, b8, c8, *mult4 = NULL, *mult8 = NULL; + uint16_t a16, b16, c16, *log16 = NULL, *alog16 = NULL; + uint32_t mask = 0; char *ra, *rb, *rc, *rd, *target; int align; diff --git a/tools/gf_inline_time.c b/tools/gf_inline_time.c index e64f0b3..193c004 100644 --- a/tools/gf_inline_time.c +++ b/tools/gf_inline_time.c @@ -62,8 +62,8 @@ int main(int argc, char **argv) int w, j, i, size, iterations; gf_t gf; double timer, elapsed, dnum, num; - uint8_t *ra, *rb, *mult4, *mult8; - uint16_t *ra16, *rb16, *log16, *alog16; + uint8_t *ra = NULL, *rb = NULL, *mult4, *mult8; + uint16_t *ra16 = NULL, *rb16 = NULL, *log16, *alog16; time_t t0; if (argc != 5) usage(NULL);