From 405f8bf8273f19381b6854f04ccb171dc9d970b3 Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Mon, 1 Apr 2013 23:05:45 +0000 Subject: [PATCH] --- ncgen/data.c | 3 +++ ncgen/ncgen.y | 1 + ncgen/ncgentab.c | 1 + ncgen/semantics.c | 2 +- oc2/ocdump.c | 2 +- oc2/xxdr.c | 2 +- 6 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ncgen/data.c b/ncgen/data.c index f2add02e9..d4887aacf 100644 --- a/ncgen/data.c +++ b/ncgen/data.c @@ -119,6 +119,7 @@ list2const(Datalist* list) con.nctype = NC_COMPOUND; con.lineno = list->data[0].lineno; con.value.compoundv = list; + con.filled = 0; return con; } @@ -634,6 +635,7 @@ emptycompoundconst(int lineno, Constant* c) c->lineno = lineno; c->nctype = NC_COMPOUND; c->value.compoundv = builddatalist(0); + c->filled = 0; return c; } @@ -645,6 +647,7 @@ emptystringconst(int lineno, Constant* c) c->nctype = NC_STRING; c->value.stringv.len = 0; c->value.stringv.stringv = NULL; + c->filled = 0; return c; } diff --git a/ncgen/ncgen.y b/ncgen/ncgen.y index b98fba2c3..221ecf1f7 100644 --- a/ncgen/ncgen.y +++ b/ncgen/ncgen.y @@ -1064,6 +1064,7 @@ makeenumconst(Symbol* econst) consttype = NC_ENUM; con.nctype = NC_ECONST; con.lineno = lineno; + con.filled = 0; /* fix up econst to be a ref to an econst*/ econst->objectclass = NC_TYPE; econst->subclass = NC_ECONST; diff --git a/ncgen/ncgentab.c b/ncgen/ncgentab.c index 73d9a0883..dc52a9eab 100644 --- a/ncgen/ncgentab.c +++ b/ncgen/ncgentab.c @@ -3236,6 +3236,7 @@ makeenumconst(Symbol* econst) consttype = NC_ENUM; con.nctype = NC_ECONST; con.lineno = lineno; + con.filled = 0; /* fix up econst to be a ref to an econst*/ econst->objectclass = NC_TYPE; econst->subclass = NC_ECONST; diff --git a/ncgen/semantics.c b/ncgen/semantics.c index 47a132376..01576515d 100644 --- a/ncgen/semantics.c +++ b/ncgen/semantics.c @@ -492,7 +492,7 @@ processspecial1(Symbol* vsym) unsigned long flags = vsym->var.special.flags; int i,tag; Constant con; - Datalist* dlist; + Datalist* dlist = NULL; if(flags == 0) return; /* no specials defined */ con = nullconstant; if((tag=(flags & _CHUNKSIZES_FLAG))) { diff --git a/oc2/ocdump.c b/oc2/ocdump.c index 7539aa565..636e78eb2 100644 --- a/oc2/ocdump.c +++ b/oc2/ocdump.c @@ -414,7 +414,7 @@ ocreadfile(FILE* file, int datastart, char** memp, size_t* lenp) { char* mem; size_t len; - size_t pos; + ssize_t pos; size_t red; struct stat stats; diff --git a/oc2/xxdr.c b/oc2/xxdr.c index aa26c01ff..eefddc3d6 100644 --- a/oc2/xxdr.c +++ b/oc2/xxdr.c @@ -219,7 +219,7 @@ xxdr_free(XXDR* xdr) int xxdr_skip(XXDR* xdrs, off_t len) { - unsigned int pos; + ssize_t pos; pos = xxdr_getpos(xdrs); pos = (pos + len); if(pos < 0) pos = 0;