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.

This commit is contained in:
sjborley 2005-05-21 15:51:32 +00:00
parent fd7d4001f6
commit 86106cfee9
1 changed files with 3 additions and 2 deletions

View File

@ -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)