Move STATIC_ASSERT statements.
This macro can only be used where a variable declaration is allowed, the vxWorks compiler objects otherwise.
This commit is contained in:
@@ -109,6 +109,7 @@ static const char *Ofldnames[] = {
|
||||
|
||||
static long init_record(aSubRecord *prec, int pass)
|
||||
{
|
||||
STATIC_ASSERT(sizeof(prec->onam)==sizeof(prec->snam));
|
||||
GENFUNCPTR pfunc;
|
||||
long status;
|
||||
int i;
|
||||
@@ -210,7 +211,6 @@ static long init_record(aSubRecord *prec, int pass)
|
||||
return S_db_BadSub;
|
||||
}
|
||||
}
|
||||
STATIC_ASSERT(sizeof(prec->onam)==sizeof(prec->snam));
|
||||
strcpy(prec->onam, prec->snam);
|
||||
prec->oval = prec->val;
|
||||
return 0;
|
||||
|
||||
@@ -93,6 +93,7 @@ static long readValue(stringinRecord *);
|
||||
|
||||
static long init_record(stringinRecord *prec, int pass)
|
||||
{
|
||||
STATIC_ASSERT(sizeof(prec->oval)==sizeof(prec->val));
|
||||
struct stringindset *pdset;
|
||||
long status;
|
||||
|
||||
@@ -119,7 +120,6 @@ static long init_record(stringinRecord *prec, int pass)
|
||||
if( pdset->init_record ) {
|
||||
if((status=(*pdset->init_record)(prec))) return(status);
|
||||
}
|
||||
STATIC_ASSERT(sizeof(prec->oval)==sizeof(prec->val));
|
||||
strcpy(prec->oval,prec->val);
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -95,6 +95,7 @@ static long writeValue(stringoutRecord *);
|
||||
|
||||
static long init_record(stringoutRecord *prec, int pass)
|
||||
{
|
||||
STATIC_ASSERT(sizeof(prec->oval)==sizeof(prec->val));
|
||||
struct stringoutdset *pdset;
|
||||
long status=0;
|
||||
|
||||
@@ -121,7 +122,6 @@ static long init_record(stringoutRecord *prec, int pass)
|
||||
if( pdset->init_record ) {
|
||||
if((status=(*pdset->init_record)(prec))) return(status);
|
||||
}
|
||||
STATIC_ASSERT(sizeof(prec->oval)==sizeof(prec->val));
|
||||
strcpy(prec->oval,prec->val);
|
||||
return(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user