diff options
| author | dgp <dgp@users.sourceforge.net> | 2020-03-05 19:22:45 (GMT) |
|---|---|---|
| committer | dgp <dgp@users.sourceforge.net> | 2020-03-05 19:22:45 (GMT) |
| commit | 1e155ca6690f927989e3afaa7559109019361d0d (patch) | |
| tree | 6549c897ab735ef9579dac3e3827963ac79d474c | |
| parent | 2a68cc554f94cf28668acb5fca37d63be1909f3f (diff) | |
| parent | 02ceb3f3a43bd0d5c7e4fe00b99c1f4cc67919a3 (diff) | |
| download | tcl-1e155ca6690f927989e3afaa7559109019361d0d.zip tcl-1e155ca6690f927989e3afaa7559109019361d0d.tar.gz tcl-1e155ca6690f927989e3afaa7559109019361d0d.tar.bz2 | |
merge 8.7
| -rw-r--r-- | generic/tcl.h | 13 | ||||
| -rw-r--r-- | generic/tclZlib.c | 3 |
2 files changed, 13 insertions, 3 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index 29f64bc..0a6db09 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -66,11 +66,12 @@ extern "C" { # define STRINGIFY(x) STRINGIFY1(x) # define STRINGIFY1(x) #x #endif +#endif /* RC_INVOKED */ + #ifndef JOIN # define JOIN(a,b) JOIN1(a,b) # define JOIN1(a,b) a##b #endif -#endif /* RC_INVOKED */ /* * A special definition used to allow this header file to be included from @@ -106,6 +107,11 @@ extern "C" { # define TCL_NORETURN __attribute__ ((noreturn)) # define TCL_NOINLINE __attribute__ ((noinline)) # define TCL_NORETURN1 __attribute__ ((noreturn)) +# if defined(__cplusplus) +# define TCL_UNUSED(T) T +# else +# define TCL_UNUSED(T) T JOIN(dummy, __LINE__) __attribute__((unused)) +# endif #else # define TCL_FORMAT_PRINTF(a,b) # if defined(_MSC_VER) && (_MSC_VER >= 1310) @@ -116,6 +122,11 @@ extern "C" { # define TCL_NOINLINE /* nothing */ # endif # define TCL_NORETURN1 /* nothing */ +# if defined(__cplusplus) +# define TCL_UNUSED(T) T +# else +# define TCL_UNUSED(T) T JOIN(dummy, __LINE__) +# endif #endif /* diff --git a/generic/tclZlib.c b/generic/tclZlib.c index 4a91e26..0d931fc 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -1925,7 +1925,7 @@ Tcl_ZlibAdler32( static int ZlibCmd( - void *dummy, + TCL_UNUSED(void *), Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) @@ -1945,7 +1945,6 @@ ZlibCmd( CMD_ADLER, CMD_COMPRESS, CMD_CRC, CMD_DECOMPRESS, CMD_DEFLATE, CMD_GUNZIP, CMD_GZIP, CMD_INFLATE, CMD_PUSH, CMD_STREAM }; - (void)dummy; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "command arg ?...?"); |
