From d19476685adab1816e24638d42aff926c5bfe62a Mon Sep 17 00:00:00 2001 From: rlar Date: Sat, 3 Jul 2010 17:55:44 +0000 Subject: [PATCH] tiny fixes --- ChangeLog | 7 +++++++ src/frontend/parser/glob.c | 4 ++-- src/frontend/subckt.c | 2 +- src/include/ngspice.h | 2 +- src/xspice/cmpp/ifs_lex.l | 4 ++-- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index bdba189af..d91c2d9d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-07-03 Robert Larice + * src/frontend/subckt.c : drop unsued variable. + * src/include/ngspice.h : add a missing extern + * src/xspice/cmpp/ifs_lex.l : atof() and atoi() live in + * src/frontend/parser/glob.c : + cast the return values of malloc() function calls + 2010-07-03 Robert Larice * src/include/cktdefs.h , * src/include/gendefs.h , diff --git a/src/frontend/parser/glob.c b/src/frontend/parser/glob.c index a5ce76d53..0b4da387c 100644 --- a/src/frontend/parser/glob.c +++ b/src/frontend/parser/glob.c @@ -116,7 +116,7 @@ brac1(char *string) int nb; words = alloc(struct wordlist); - words->wl_word = tmalloc(BSIZE_SP); + words->wl_word = (char*) tmalloc(BSIZE_SP); words->wl_word[0] = 0; words->wl_next = NULL; words->wl_prev = NULL; @@ -144,7 +144,7 @@ brac1(char *string) nw = alloc(struct wordlist); nw->wl_next = NULL; nw->wl_prev = NULL; - nw->wl_word = tmalloc(BSIZE_SP); + nw->wl_word = (char*) tmalloc(BSIZE_SP); (void) strcpy(nw->wl_word, wl->wl_word); (void) strcat(nw->wl_word, w->wl_word); newwl = wl_append(newwl, nw); diff --git a/src/frontend/subckt.c b/src/frontend/subckt.c index a31afa9ff..658649d6d 100644 --- a/src/frontend/subckt.c +++ b/src/frontend/subckt.c @@ -156,7 +156,7 @@ inp_subcktexpand(struct line *deck) { struct line *ll, *c; char *s; - int ok = 0, skip_control = 0; + int ok = 0; char *t; int i; wordlist *wl; diff --git a/src/include/ngspice.h b/src/include/ngspice.h index 97a3c46e8..ca96d6782 100644 --- a/src/include/ngspice.h +++ b/src/include/ngspice.h @@ -123,7 +123,7 @@ # else # ifdef HAVE_FTIME # include -struct timeb timebegin; +extern struct timeb timebegin; # endif # endif #endif diff --git a/src/xspice/cmpp/ifs_lex.l b/src/xspice/cmpp/ifs_lex.l index bdfbf7650..9a52a146b 100755 --- a/src/xspice/cmpp/ifs_lex.l +++ b/src/xspice/cmpp/ifs_lex.l @@ -42,13 +42,13 @@ NON-STANDARD FEATURES ============================================================================*/ +#include + #include "ifs_yacc_y.h" #include "ifs_yacc.h" int yyival; double yydval; -extern int atoi(); -extern double atof(); extern void ifs_yyerror (char*); /*