ESQL/C v4 to v5
Posted in 1993
Netters: Following portion of ESQL/C code which was compiling just fine under ESQL/C 4.0 port for SCO UNIX V3.2 is giving the following warnings when compiled with ESQL/C 5.0. It being just a warning, the compiled programs (4.0 & 5.0) behaves perfectly OK. My question is how to get rid of these warnings under 5.0 ?? /* ------------ Code follows -------------- */ /* Part of Global data */ $struct { long repid; string reptag [DB_NAME_LEN+1]; string repname [DB_LONGNAME_LEN+1]; string script [DB_NAME_LEN+1]; fixchar syscre; short ownerid; fixchar reptype; fixchar cleanup; fixchar repperiod; date sdate; datetime hour to minute stime; date fdate; datetime hour to minute ftime; fixchar paramtype; string paramstr[256]; } RepParm; : <stuff> : main() { <stuff> : $insert into repparam values( $RepParm ); ====> Line #330 } /* ------------ Warnings under 5.0 -------------- */ esqlc: "schrep.ec", line 330: Warning -33208: Runtime error is possible because size of '(RepParm).reptag' is unknown. Message repeated for ... size of '(RepParm).repname' is unknown. size of '(RepParm).script' is unknown. size of '(RepParm).syscre' is unknown. size of '(RepParm).reptype' is unknown. size of '(RepParm).cleanup' is unknown. size of '(RepParm).repperiod' is unknown. size of '(RepParm).paramtype' is unknown. /* ----- Corrections attempted ----- */ In an attempt to remove warnings, I changed all fixchar to char & I stopped getting "Runtime error is possible" message but instead got the following... schrep.ec(330) : warning C4047: '=' : different levels of indirection schrep.ec(330) : warning C4047: '=' : different levels of indirection schrep.ec(330) : warning C4047: '=' : different levels of indirection schrep.ec(330) : warning C4047: '=' : different levels of indirection schrep.ec(330) : warning C4047: '=' : different levels of indirection FRUSTRATION :-( This is something - ain't it ?? I would have tought that if anything the 5.0 preprocessor (esql) would have better C-code generation than 4.0 preprocessor !! Bharat ======================================================================== Informix-OnLine 4.00.UD5 (testing with 5.0) SCO 3.2 Informix-Isql 4.00 AST 486/33 Informix-Esql/C 4.00 (testing 5.0 upgrade) Wingz 1.10 Bharat Shah Voice: (508)-663-7570 Unifi Communications Corp. Fax: (508)-663-7543 4 Federal St, Billerica, Mass 01821, USA bharat@unifi.com ========================================================================