diff --git a/ChangeLog b/ChangeLog index 92f3e6a59..37d05aca9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-11-16 Robert Larice + * src/frontend/parse-bison.y , + * src/spicelib/parser/inpptree-parser.y , + * src/xspice/xspice.c , + * src/xspice/cm/cmexport.c : + convert macro `U()' to `IGNORE()' + 2010-11-16 Robert Larice * src/**/* : pour `IGNORE()' all over the source diff --git a/src/frontend/parse-bison.y b/src/frontend/parse-bison.y index f1fff6da1..01a766609 100644 --- a/src/frontend/parse-bison.y +++ b/src/frontend/parse-bison.y @@ -30,7 +30,7 @@ # define __func__ __FUNCTION__ /* __func__ is C99, but MSC can't */ #endif - #define U(x) (void)x + %} %name-prefix="PP" diff --git a/src/spicelib/parser/inpptree-parser.y b/src/spicelib/parser/inpptree-parser.y index b9d56f815..28d8c7680 100644 --- a/src/spicelib/parser/inpptree-parser.y +++ b/src/spicelib/parser/inpptree-parser.y @@ -12,7 +12,7 @@ # define __func__ __FUNCTION__ /* __func__ is C99, but MSC can't */ #endif - #define U(x) (void)x + %} %name-prefix="PT" @@ -110,6 +110,9 @@ nonempty_arglist: static void PTerror (char **line, struct INPparseNode **retval, void *ckt, char const *s) { - U(line); U(retval); U(ckt); + IGNORE(line); + IGNORE(retval); + IGNORE(ckt); + fprintf (stderr, "%s: %s\n", __func__, s); } diff --git a/src/xspice/cm/cmexport.c b/src/xspice/cm/cmexport.c index 287d2ea64..8b198b98b 100755 --- a/src/xspice/cm/cmexport.c +++ b/src/xspice/cm/cmexport.c @@ -3,8 +3,6 @@ #include #include -#define U(x) (void)x - /*how annoying!, needed for structure below*/ static void *tcalloc(size_t a, size_t b) { return tmalloc(a*b); /* FIXME, tcalloc must zero !?!? */ @@ -12,7 +10,7 @@ static void *tcalloc(size_t a, size_t b) { #ifdef HAVE_LIBGC static void no_free(void *p) { - U(p); + IGNORE(p); } #endif diff --git a/src/xspice/xspice.c b/src/xspice/xspice.c index c0a301709..6f9d36deb 100755 --- a/src/xspice/xspice.c +++ b/src/xspice/xspice.c @@ -3,15 +3,13 @@ #include #include -#define U(x) (void)x - /*how annoying!, needed for structure below*/ static void *tcalloc(size_t a, size_t b) { return tmalloc(a*b); /* FIXME, tcalloc must zero !?!? */ } static void no_free(void *p) { - U(p); + IGNORE(p); } static FILE * no_file(void) {