From 83f9110dc149b1291208a8823243246b246ddda2 Mon Sep 17 00:00:00 2001 From: rlar Date: Tue, 23 Nov 2010 20:00:50 +0000 Subject: [PATCH] use NG_IGNORE() ... --- ChangeLog | 5 +++++ src/xspice/icm/xtraevt/int/udnfunc.c | 8 ++++++++ src/xspice/icm/xtraevt/real/udnfunc.c | 6 ++++++ 3 files changed, 19 insertions(+) diff --git a/ChangeLog b/ChangeLog index cc2cf52a1..4a5ae3080 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-11-23 Robert Larice + * src/xspice/icm/xtraevt/int/udnfunc.c , + * src/xspice/icm/xtraevt/real/udnfunc.c : + use NG_IGNORE() ... + 2010-11-23 Robert Larice * src/ciderlib/oned/oneprint.c , * src/ciderlib/support/globals.c , diff --git a/src/xspice/icm/xtraevt/int/udnfunc.c b/src/xspice/icm/xtraevt/int/udnfunc.c index 8113ebbc3..59b1f0c65 100644 --- a/src/xspice/icm/xtraevt/int/udnfunc.c +++ b/src/xspice/icm/xtraevt/int/udnfunc.c @@ -48,6 +48,8 @@ void *tmalloc(size_t); #define TMALLOC(t,n) (t*) tmalloc(sizeof(t) * (size_t)(n)) +/* macro to ignore unused variables and parameters */ +#define NG_IGNORE(x) (void)x /* ************************************************************************ */ @@ -62,6 +64,8 @@ static void udn_int_create(CREATE_ARGS) static void udn_int_dismantle(DISMANTLE_ARGS) { + NG_IGNORE(STRUCT_PTR); + /* Do nothing. There are no internally malloc'ed things to dismantle */ } @@ -141,6 +145,8 @@ static void udn_int_plot_val(PLOT_VAL_ARGS) { int *int_struct = (int *) STRUCT_PTR; + NG_IGNORE(STRUCT_MEMBER_ID); + /* Output a value for the int struct */ PLOT_VAL = *int_struct; } @@ -152,6 +158,8 @@ static void udn_int_print_val(PRINT_VAL_ARGS) { int *int_struct = (int *) STRUCT_PTR; + NG_IGNORE(STRUCT_MEMBER_ID); + /* Allocate space for the printed value */ PRINT_VAL = TMALLOC(char, 30); diff --git a/src/xspice/icm/xtraevt/real/udnfunc.c b/src/xspice/icm/xtraevt/real/udnfunc.c index 9970edbc4..7c98f9fe2 100644 --- a/src/xspice/icm/xtraevt/real/udnfunc.c +++ b/src/xspice/icm/xtraevt/real/udnfunc.c @@ -48,6 +48,8 @@ void *tmalloc(size_t); #define TMALLOC(t,n) (t*) tmalloc(sizeof(t) * (size_t)(n)) +/* macro to ignore unused variables and parameters */ +#define NG_IGNORE(x) (void)x /* ************************************************************************ */ @@ -62,6 +64,8 @@ static void udn_real_create(CREATE_ARGS) static void udn_real_dismantle(DISMANTLE_ARGS) { + NG_IGNORE(STRUCT_PTR); + /* Do nothing. There are no internally malloc'ed things to dismantle */ } @@ -142,6 +146,7 @@ static void udn_real_plot_val(PLOT_VAL_ARGS) { double *real_struct = (double *) STRUCT_PTR; + NG_IGNORE(STRUCT_MEMBER_ID); /* Output a value for the real struct */ PLOT_VAL = *real_struct; @@ -154,6 +159,7 @@ static void udn_real_print_val(PRINT_VAL_ARGS) { double *real_struct = (double *) STRUCT_PTR; + NG_IGNORE(STRUCT_MEMBER_ID); /* Allocate space for the printed value */ PRINT_VAL = TMALLOC(char, 30);