initialize correctly the stuctures

SVN revision: 34243
This commit is contained in:
doursse 2008-04-11 05:29:33 +00:00 committed by doursse
parent 80c1db4f0c
commit 5b899a19e3
3 changed files with 14 additions and 15 deletions

View File

@ -1176,7 +1176,7 @@ declloc(int fstatic)
symbol *sym;
cell val, size;
char *str;
value lval = { 0 };
value lval = { NULL, 0, 0, 0, 0, NULL };
int cur_lit = 0;
int dim[sDIMEN_MAX];
int numdim, level;
@ -3422,7 +3422,7 @@ test(int label, int parens, int invert)
{
int index, tok;
cell cidx;
value lval = { 0 };
value lval = { NULL, 0, 0, 0, 0, NULL };
int localstaging = FALSE;
if (!staging)
@ -3835,7 +3835,7 @@ doassert(void)
{
int flab1, index;
cell cidx;
value lval = { 0 };
value lval = { NULL, 0, 0, 0, 0, NULL };
if ((sc_debug & sCHKBOUNDS) != 0)
{

View File

@ -515,7 +515,7 @@ plnge(int *opstr, int opoff, int (*hier) (value * lval), value * lval,
{
int lvalue, opidx;
int count;
value lval2 = { 0 };
value lval2 = { NULL, 0, 0, 0, 0, NULL };
lvalue = plnge1(hier, lval);
if (nextop(&opidx, opstr) == 0)
@ -547,7 +547,7 @@ static int
plnge_rel(int *opstr, int opoff, int (*hier) (value * lval), value * lval)
{
int lvalue, opidx;
value lval2 = { 0 }; /* intialize, to avoid a compiler warning */
value lval2 = { NULL, 0, 0, 0, 0, NULL };
int count;
/* this function should only be called for relational operators */
@ -630,7 +630,7 @@ plnge2(void (*oper) (void),
{ /* constant on right side */
if (commutative(oper))
{ /* test for commutative operators */
value lvaltmp = { 0 };
value lvaltmp = { NULL, 0, 0, 0, 0, NULL };
stgdel(index, cidx); /* scratch push1() and constant fetch (then
* fetch the constant again */
const2(lval2->constval << dbltest(oper, lval1, lval2));
@ -760,7 +760,7 @@ calc(cell left, void (*oper) (), cell right, char *boolresult)
int
expression(int *constant, cell * val, int *tag, int chkfuncresult)
{
value lval = { 0 };
value lval = { NULL, 0, 0, 0, 0, NULL };
if (hier14(&lval))
rvalue(&lval);
@ -824,9 +824,8 @@ int
hier14(value * lval1)
{
int lvalue;
value lval2 = { 0 }, lval3 =
{
0};
value lval2 = { NULL, 0, 0, 0, 0, NULL };
value lval3 = { NULL, 0, 0, 0, 0, NULL };
void (*oper) (void);
int tok, level, i;
cell val;
@ -1064,7 +1063,7 @@ static int
hier13(value * lval)
{
int lvalue, flab1, flab2;
value lval2 = { 0 };
value lval2 = { NULL, 0, 0, 0, 0, NULL };
int array1, array2;
lvalue = plnge1(hier12, lval);
@ -1484,7 +1483,7 @@ hier1(value * lval1)
{
int lvalue, index, tok, symtok;
cell val, cidx;
value lval2 = { 0 };
value lval2 = { NULL, 0, 0, 0, 0, NULL };
char *st;
char close;
symbol *sym;
@ -1901,7 +1900,7 @@ callfunction(symbol * sym)
int nargs = 0; /* number of arguments */
int heapalloc = 0;
int namedparams = FALSE;
value lval = { 0 };
value lval = { NULL, 0, 0, 0, 0, NULL };
arginfo *arg;
char arglist[sMAXARGS];
constvalue arrayszlst = { NULL, "", 0, 0 }; /* array size list starts empty */

View File

@ -131,7 +131,7 @@ delete_stringpair(stringpair * root, stringpair * item)
}
/* ----- alias table --------------------------------------------- */
static stringpair alias_tab = { NULL, NULL, NULL }; /* alias table */
static stringpair alias_tab = { NULL, NULL, NULL, 0 }; /* alias table */
stringpair *
insert_alias(char *name, char *alias)
@ -217,7 +217,7 @@ delete_pathtable(void)
/* ----- text substitution patterns ------------------------------ */
static stringpair substpair = { NULL, NULL, NULL }; /* list of substitution pairs */
static stringpair substpair = { NULL, NULL, NULL, 0 }; /* list of substitution pairs */
static stringpair *substindex['z' - 'A' + 1]; /* quick index to first character */
static void