diff --git a/src/frontend/breakp.c b/src/frontend/breakp.c index 8fd822eef..eb20980fc 100644 --- a/src/frontend/breakp.c +++ b/src/frontend/breakp.c @@ -241,7 +241,7 @@ com_iplot(wordlist *wl) return; } - struct dbcomm *d, *td, *currentdb = NULL; + struct dbcomm *d, *td = NULL, *currentdb = NULL; double window = 0.0; #ifdef XSPICE int event_auto_incr = 0; @@ -311,7 +311,7 @@ com_iplot(wordlist *wl) /* Chain in expected order. */ - if (currentdb) + if (currentdb && td) td->db_also = d; else currentdb = d; diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index e13b10cd5..8e692bac9 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -1491,6 +1491,7 @@ static struct inp_read_t inp_read(FILE* fp, int call_depth, const char* dir_name struct card* newcard; struct compat tmpcomp; + memset(&tmpcomp, 0, sizeof(tmpcomp)); bool compset = FALSE; /* special treatment of special .inc commands */ diff --git a/src/frontend/plotting/graf.c b/src/frontend/plotting/graf.c index 2e29e07fa..6a6ca5f57 100644 --- a/src/frontend/plotting/graf.c +++ b/src/frontend/plotting/graf.c @@ -84,7 +84,7 @@ int gr_init(double *xlims, double *ylims, /* The size of the screen. */ const char *commandline, /* For xi_zoomdata() */ int prevgraph) /* plot id, if started from a previous plot*/ { - GRAPH *graph, *pgraph; + GRAPH *graph, *pgraph = NULL; wordlist *wl; NG_IGNORE(nplots); @@ -182,7 +182,7 @@ int gr_init(double *xlims, double *ylims, /* The size of the screen. */ } /* restore data from previous graph, e.g. for zooming */ - if (prevgraph > 0) { + if (prevgraph > 0 && pgraph) { int i; /* transmit colors */ @@ -1359,7 +1359,7 @@ void gr_iplot(struct plot *plot) struct dbcomm *dd; int dup = 0; #ifdef XSPICE - char *offp, save_sign; + char *offp, save_sign = '\0'; #endif if (dc->db_nodename1 == NULL) diff --git a/src/spicelib/parser/inp2n.c b/src/spicelib/parser/inp2n.c index b01d8b44c..2593c7465 100644 --- a/src/spicelib/parser/inp2n.c +++ b/src/spicelib/parser/inp2n.c @@ -30,7 +30,7 @@ void INP2N(CKTcircuit *ckt, INPtables *tab, struct card *current) { GENinstance *fast; /* Pointer to the actual instance. */ int waslead; /* Funny unlabeled number was found. */ double leadval; /* Value of unlabeled number. */ - INPmodel *thismodel; /* Pointer to model description for user's model. */ + INPmodel *thismodel = NULL; /* Pointer to model description for user's model. */ GENmodel *mdfast; /* Pointer to the actual model. */ IFdevice *dev; CKTnode *node;