Fixed code to avoid errors (invalid lvalue in assignment) under gcc v4.0.2 or and warnings under gcc 4.0.0 (target of assignment not really an lvalue).

This commit is contained in:
sjborley 2005-10-15 15:34:18 +00:00
parent b79423051d
commit 3187fdf79d
2 changed files with 10 additions and 11 deletions

View File

@ -1,3 +1,9 @@
2005-10-15 Steven Borley <steven.borley@virgin.net>
* src/frontend/spiceif.c: Fixed code to avoid errors (invalid lvalue in
assignment) under gcc v4.0.2 or and warnings under gcc 4.0.0 (target of
assignment not really an lvalue).
2005-10-15 Steven Borley <steven.borley@virgin.net>
* INTALL: Improved notes for MinGW/MSYS

View File

@ -1156,13 +1156,6 @@ void com_loadsnap(wordlist *wl) {
_t(CKTabsDv);
_t(CKTrelDv);
_t(CKTtroubleNode);
/* if(name) {\
tfree(name);\
name = NULL;\
}\*/
#undef _foo
#define _foo(name,type,_size)\
@ -1172,7 +1165,7 @@ do {\
if(__i) {\
if(name)\
tfree(name);\
name = (type *)tmalloc(__i);\
name = tmalloc(__i);\
fread(name,1,__i,file);\
} else {\
fprintf(cp_err, "size for vector " #name " is 0\n");\
@ -1181,7 +1174,7 @@ do {\
fprintf(cp_err,"expected %ld, but got %d for "#name"\n",(long)(_size)*sizeof(type),__i);\
}\
} while(0)
for(i=0;i<=ckt->CKTmaxOrder+1;i++) {
_foo(ckt->CKTstates[i],double,ckt->CKTnumStates);
@ -1203,7 +1196,7 @@ do {\
_foo(ckt->CKTbreaks,double,ckt->CKTbreakSize);
_foo((TSKtask *)ft_curckt->ci_curTask,TSKtask,1);
_foo(ft_curckt->ci_curTask,TSKtask,1);
/* To stop the Free */
((TSKtask *)ft_curckt->ci_curTask)->TSKname = NULL;
@ -1211,7 +1204,7 @@ do {\
_foo(((TSKtask *)ft_curckt->ci_curTask)->TSKname,char,-1);
_foo(((TRANan *)((TSKtask *)ft_curckt->ci_curTask)->jobs),TRANan,1);
_foo(((TSKtask *)ft_curckt->ci_curTask)->jobs,TRANan,1);
((TSKtask *)ft_curckt->ci_curTask)->jobs->JOBname = NULL;
ckt->CKTcurJob = (JOB *)((TSKtask *)ft_curckt->ci_curTask)->jobs;