From 86106cfee9b3de7acc41f2088cc2af05d5f1298e Mon Sep 17 00:00:00 2001 From: sjborley Date: Sat, 21 May 2005 15:51:32 +0000 Subject: [PATCH] Fixed problems where printf format was int yet on some systems the argument is long (due to size_t being long). Fixed by always using long format and casting to long. --- src/frontend/spiceif.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/frontend/spiceif.c b/src/frontend/spiceif.c index bbe5fdffa..183b9767f 100644 --- a/src/frontend/spiceif.c +++ b/src/frontend/spiceif.c @@ -2,6 +2,7 @@ Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group Modified: 2000 AlansFixes +$Id$ **********/ /* @@ -1068,7 +1069,7 @@ void com_loadsnap(wordlist *wl) { fread(&tmpI,sizeof(int),1,file); if(tmpI != sizeof(CKTcircuit) ) { - fprintf(cp_err,"loaded num: %d, expected num: %d\n",tmpI,sizeof(CKTcircuit)); + fprintf(cp_err,"loaded num: %d, expected num: %ld\n",tmpI,(long)sizeof(CKTcircuit)); fprintf(cp_err, "Error: snapshot saved with different version of spice\n"); fclose(file); @@ -1177,7 +1178,7 @@ do {\ fprintf(cp_err, "size for vector " #name " is 0\n");\ }\ if((_size) != -1 && __i != (_size) * sizeof(type)) {\ - fprintf(cp_err,"expected %d, but got %d for "#name"\n",(_size)*sizeof(type),__i);\ + fprintf(cp_err,"expected %ld, but got %d for "#name"\n",(long)(_size)*sizeof(type),__i);\ }\ } while(0)