Browse Source

initialize local variables

pre-master-46
dwarning 17 years ago
parent
commit
07e06cf701
  1. 2
      src/frontend/com_fft.c
  2. 2
      src/frontend/com_gnuplot.c
  3. 2
      src/frontend/com_xgraph.c
  4. 4
      src/frontend/device.c
  5. 4
      src/frontend/inp.c
  6. 3
      src/frontend/inpcom.c
  7. 2
      src/frontend/plotting/gnuplot.c
  8. 2
      src/frontend/resource.c
  9. 6
      src/frontend/subckt.c

2
src/frontend/com_fft.c

@ -24,7 +24,7 @@ com_fft(wordlist *wl)
double *freq, *win, *time; double *freq, *win, *time;
double delta_t, span; double delta_t, span;
int fpts, i, j, tlen, ngood; int fpts, i, j, tlen, ngood;
struct dvec *f, *vlist, *lv, *vec;
struct dvec *f, *vlist, *lv = NULL, *vec;
struct pnode *names, *first_name; struct pnode *names, *first_name;
float *reald, *imagd; float *reald, *imagd;

2
src/frontend/com_gnuplot.c

@ -13,7 +13,7 @@
void void
com_gnuplot(wordlist *wl) com_gnuplot(wordlist *wl)
{ {
char *fname;
char *fname = NULL;
bool tempf = FALSE; bool tempf = FALSE;
if (wl) { if (wl) {

2
src/frontend/com_xgraph.c

@ -13,7 +13,7 @@
void void
com_xgraph(wordlist *wl) com_xgraph(wordlist *wl)
{ {
char *fname;
char *fname = NULL;
bool tempf = FALSE; bool tempf = FALSE;
if (wl) { if (wl) {

4
src/frontend/device.c

@ -868,7 +868,7 @@ com_altermod(wordlist *wl)
void void
com_alter_common(wordlist *wl, int do_model) com_alter_common(wordlist *wl, int do_model)
{ {
wordlist *eqword, *words;
wordlist *eqword = NULL, *words;
char *dev, *p; char *dev, *p;
char *param; char *param;
struct dvec *dv; struct dvec *dv;
@ -878,7 +878,7 @@ com_alter_common(wordlist *wl, int do_model)
char *argument; char *argument;
char **arglist; char **arglist;
int i=0, step=0, n, wlen, maxelem=3; int i=0, step=0, n, wlen, maxelem=3;
wordlist *wl2, *wlin, *wleq;
wordlist *wl2 = NULL, *wlin, *wleq;
bool eqfound = FALSE, vecfound = FALSE; bool eqfound = FALSE, vecfound = FALSE;
if (!ft_curckt) { if (!ft_curckt) {

4
src/frontend/inp.c

@ -318,7 +318,7 @@ inp_spsource(FILE *fp, bool comfile, char *filename)
*/ */
{ {
struct line *deck, *dd, *ld, *prev_param = NULL, *prev_card = NULL; struct line *deck, *dd, *ld, *prev_param = NULL, *prev_card = NULL;
struct line *realdeck, *options = NULL, *curr_meas = NULL;
struct line *realdeck = NULL, *options = NULL, *curr_meas = NULL;
char *tt = NULL, name[BSIZE_SP], *s, *t, *temperature = NULL; char *tt = NULL, name[BSIZE_SP], *s, *t, *temperature = NULL;
double testemp = 0.0; double testemp = 0.0;
bool nosubckts, commands = FALSE; bool nosubckts, commands = FALSE;
@ -654,7 +654,7 @@ inp_dodeck(
struct circ *ct; struct circ *ct;
struct line *dd; struct line *dd;
char *ckt, *s; char *ckt, *s;
INPtables *tab;
INPtables *tab = NULL;
struct variable *eev = NULL; struct variable *eev = NULL;
wordlist *wl; wordlist *wl;
bool noparse, ii; bool noparse, ii;

3
src/frontend/inpcom.c

@ -1021,7 +1021,8 @@ inp_readall(FILE *fp, struct line **data, int call_depth, char *dir_name)
int ipc_len; int ipc_len;
#endif #endif
char *copys=NULL, big_buff2[5000]; char *copys=NULL, big_buff2[5000];
char *global_copy = NULL, keep_char;
/* char *global_copy = NULL; */
char keep_char;
int line_number = 1; /* sjb - renamed to avoid confusion with struct line */ int line_number = 1; /* sjb - renamed to avoid confusion with struct line */
int line_number_orig = 1, line_number_lib = 1, line_number_inc = 1; int line_number_orig = 1, line_number_lib = 1, line_number_inc = 1;
int no_braces = 0; /* number of '{' */ int no_braces = 0; /* number of '{' */

2
src/frontend/plotting/gnuplot.c

@ -26,7 +26,7 @@ ft_gnuplot(double *xlims, double *ylims, char *filename, char *title, char *xlab
{ {
FILE *file, *file_data; FILE *file, *file_data;
struct dvec *v, *scale;
struct dvec *v, *scale = NULL;
double xval, yval; double xval, yval;
int i, numVecs, linewidth; int i, numVecs, linewidth;
bool xlog, ylog, nogrid, markers; bool xlog, ylog, nogrid, markers;

2
src/frontend/resource.c

@ -201,7 +201,7 @@ printres(char *name)
#endif #endif
bool yy = FALSE; bool yy = FALSE;
static long lastsec = 0, lastusec = 0; static long lastsec = 0, lastusec = 0;
struct variable *v, *vfree;
struct variable *v, *vfree = NULL;
char *cpu_elapsed; char *cpu_elapsed;
#ifdef XSPICE #ifdef XSPICE

6
src/frontend/subckt.c

@ -144,7 +144,7 @@ inp_subcktexpand(struct line *deck)
{ {
struct line *ll, *c; struct line *ll, *c;
char *s; char *s;
int ok;
int ok = 0;
char *t; char *t;
int i; int i;
wordlist *wl; wordlist *wl;
@ -320,7 +320,7 @@ inp_subcktexpand(struct line *deck)
if (ciprefix(invoke, c->li_line)) { if (ciprefix(invoke, c->li_line)) {
fprintf(cp_err, "Error: unknown subckt: %s\n", c->li_line); fprintf(cp_err, "Error: unknown subckt: %s\n", c->li_line);
if ( use_numparams ) { if ( use_numparams ) {
ok= ok && nupa_signal(NUPAEVALDONE, NULL);
ok = ok && nupa_signal(NUPAEVALDONE, NULL);
} }
return NULL; return NULL;
} }
@ -374,7 +374,7 @@ doit(struct line *deck)
{ {
struct line *c, *last, *lc, *lcc; struct line *c, *last, *lc, *lcc;
struct line *savenext; struct line *savenext;
struct subs *sssfree, *sss = (struct subs *) NULL, *ks; /* *sss and *ks temporarily hold decks to substitute */
struct subs *sssfree = (struct subs *) NULL, *sss = (struct subs *) NULL, *ks; /* *sss and *ks temporarily hold decks to substitute */
char *s, *t, *scname, *subname; char *s, *t, *scname, *subname;
int nest, numpasses = MAXNEST, i; int nest, numpasses = MAXNEST, i;
bool gotone; bool gotone;

Loading…
Cancel
Save