Branch: Tag:

2001-07-01

2001-07-01 21:34:51 by Martin Stjernholm <mast@lysator.liu.se>

Avoid the missing initializer warnings if the compiler allows us to
initialize unions.

Rev: src/acconfig.h:1.88
Rev: src/array.c:1.115
Rev: src/bignum.c:1.22
Rev: src/configure.in:1.530
Rev: src/encode.c:1.102
Rev: src/error.c:1.73
Rev: src/mapping.c:1.128
Rev: src/svalue.c:1.109

23:   #include "stuff.h"   #include "bignum.h"    - RCSID("$Id: array.c,v 1.114 2001/06/30 18:44:21 hubbe Exp $"); + RCSID("$Id: array.c,v 1.115 2001/07/01 21:34:50 mast Exp $");      PMOD_EXPORT struct array empty_array=   {
35:    0, /* no types */    0, /* no flags */    empty_array.real_item, /* Initialize the item pointer. */ + #ifdef HAVE_UNION_INIT +  {{0, 0, {0}}}, /* Only to avoid warnings. */ + #endif   };   PMOD_EXPORT struct array weak_empty_array=   {    PIKE_CONSTANT_MEMOBJ_INIT(1),    &weak_shrink_empty_array, &empty_array, 0, 0, 0, ARRAY_WEAK_FLAG,    weak_empty_array.real_item, -  + #ifdef HAVE_UNION_INIT +  {{0, 0, {0}}}, /* Only to avoid warnings. */ + #endif   };   PMOD_EXPORT struct array weak_shrink_empty_array=   {    PIKE_CONSTANT_MEMOBJ_INIT(1),    &empty_array, &weak_empty_array, 0, 0, 0, ARRAY_WEAK_FLAG|ARRAY_WEAK_SHRINK,    weak_shrink_empty_array.real_item, -  + #ifdef HAVE_UNION_INIT +  {{0, 0, {0}}}, /* Only to avoid warnings. */ + #endif   };      struct array *gc_internal_array = &empty_array;