mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
cleanup: fix redundant NOT_USED macro redefinition (re: 733f70e9
)
The NOT_USED() macro is already defined in ast.h (which is included by shell.h) as an alias of NoP(). So it's better to apply the fix to NoP() so it takes effect for both verrsions, for libast and ksh.
This commit is contained in:
parent
9ee82b83e0
commit
88d7a62b4d
2 changed files with 1 additions and 13 deletions
|
@ -37,18 +37,6 @@
|
|||
# include <nval.h>
|
||||
#endif /* _SH_PRIVATE */
|
||||
|
||||
/*
|
||||
* This is a macro that can be used to silence "unused parameter" warnings from the compiler for
|
||||
* functions which need to accept parameters they do not use because they need to be compatible
|
||||
* with an interface.
|
||||
*/
|
||||
#undef NOT_USED
|
||||
#define NOT_USED(expr) \
|
||||
do { \
|
||||
(void)(expr); \
|
||||
} while (0)
|
||||
|
||||
|
||||
/* options */
|
||||
typedef struct
|
||||
{
|
||||
|
|
|
@ -228,7 +228,7 @@ typedef struct
|
|||
|
||||
#if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
|
||||
#define NiL 0
|
||||
#define NoP(x) (void)(x)
|
||||
#define NoP(x) do (void)(x); while(0) /* for silencing "unused parameter" warnings */
|
||||
#else
|
||||
#define NiL ((char*)0)
|
||||
#define NoP(x) (&x,1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue