diff --git a/src/rec/aSubRecord.c b/src/rec/aSubRecord.c index 455f803cf..a4ecf4179 100644 --- a/src/rec/aSubRecord.c +++ b/src/rec/aSubRecord.c @@ -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; diff --git a/src/rec/stringinRecord.c b/src/rec/stringinRecord.c index 5bff99c8c..ce2200fa1 100644 --- a/src/rec/stringinRecord.c +++ b/src/rec/stringinRecord.c @@ -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); } diff --git a/src/rec/stringoutRecord.c b/src/rec/stringoutRecord.c index d62fe2479..92567706e 100644 --- a/src/rec/stringoutRecord.c +++ b/src/rec/stringoutRecord.c @@ -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); }