Browse Source

swallow warnings

rlar 14 years ago
parent
commit
d50ffdd987
  1. 12
      src/frontend/spiceif.c
  2. 4
      src/main.c
  3. 8
      src/misc/string.c
  4. 1
      src/spicelib/devices/asrc/asrcdest.c

12
src/frontend/spiceif.c

@ -1491,8 +1491,8 @@ do {\
if(__i) {\
if(name)\
tfree(name);\
name = (type *)tmalloc(__i);\
fread(name,1,__i,file);\
name = (type *)tmalloc((size_t) __i);\
fread(name,1,(size_t) __i,file);\
} else {\
fprintf(cp_err, "size for vector " #name " is 0\n");\
}\
@ -1642,9 +1642,9 @@ void com_savesnap(wordlist *wl)
do {\
int __i;\
if(name) {\
__i = (num) * sizeof(type); fwrite(&__i,sizeof(int),1,file);\
__i = (num) * (int)sizeof(type); fwrite(&__i,sizeof(int),1,file);\
if((num))\
fwrite(name,sizeof(type),(num),file);\
fwrite(name,sizeof(type),(size_t)(num),file);\
} else {\
__i = 0;\
fprintf(cp_err,#name " is NULL, zero written\n");\
@ -1704,7 +1704,7 @@ void com_savesnap(wordlist *wl)
/* now save the TSK struct, ft_curckt->ci_curTask*/
_foo(task,TSKtask,1);
_foo(task->TSKname,char,(strlen(task->TSKname)+1));
_foo(task->TSKname,char,((int)strlen(task->TSKname)+1));
/* now save the JOB struct task->jobs */
/* lol, only allow one job, tough! */
@ -1712,7 +1712,7 @@ void com_savesnap(wordlist *wl)
_foo(task->jobs,TRANan,1);
_foo(task->jobs->JOBname,char,(strlen(task->jobs->JOBname)+1));
_foo(task->jobs->JOBname,char,((int)strlen(task->jobs->JOBname)+1));
/* Finally the stats */

4
src/main.c

@ -353,8 +353,8 @@ if_getstat(CKTcircuit *ckt, char *name)
return (NULL);
}
void com_loadsnap(wordlist *wl) { return; }
void com_savesnap(wordlist *wl) { return; }
void com_loadsnap(wordlist *wl) { NG_IGNORE(wl); }
void com_savesnap(wordlist *wl) { NG_IGNORE(wl); }
void SMPprint( SMPmatrix *n1 , char *n2)
{

8
src/misc/string.c

@ -387,8 +387,12 @@ gettok_char(char **s, char p, bool inc_p, bool nested)
char q;
int count = 0;
/* find opening bracket */
if (( p == '}' ) || ( p == ']' )) q = p - 2;
else q = p - 1;
if ( p == '}' )
q = '{';
else if(p == ']' )
q = '[';
else
q = '(';
/* add string in front of q, excluding q */
while ((c = **s) != '\0' && ( **s != q )) {
spice_dstring_append_char( &buf, *(*s)++ ) ;

1
src/spicelib/devices/asrc/asrcdest.c

@ -6,6 +6,7 @@ Author: 1987 Kanwar Jit Singh
#include "ngspice/ngspice.h"
#include "asrcdefs.h"
#include "ngspice/suffix.h"
#include "ngspice/inpdefs.h"
void
ASRCdestroy(GENmodel **model)

Loading…
Cancel
Save