Re: What am I doing wrong with this macro
- From: Ian Collins <ian-news@xxxxxxxxxxx>
- Date: Wed, 30 Jan 2008 12:41:23 +1300
John wrote:
I have a macro defined as:
#ifdef DEBUG
#define DEBUG_PRINT(level, format, a...) \
if ((level) & debug_level) cmn_err(CE_NOTE,"%s: " format, ##a)
#else
#define DEBUG_PRINT(level, format, a...)
#endif
In the code, I'll do this
DEBUG_PRINT(DEBUG_READ,"This is an Error Message\n");
When I compile, I'm getting the error message,"warning: argument
mismatch".
I copied the code from from of our programs written in linux and
replace the cmn_err statement to match Solaris.
What am I doing wrong?
You are using a variadic macro which requires at least 3 parameters,
with only 2.
--
Ian Collins.
.
- References:
- What am I doing wrong with this macro
- From: John
- What am I doing wrong with this macro
- Prev by Date: Re: What am I doing wrong with this macro
- Next by Date: Re: How to I mount a shared directory on an XP platform using SAMBA
- Previous by thread: Re: What am I doing wrong with this macro
- Next by thread: How to I mount a shared directory on an XP platform using SAMBA
- Index(es):
Relevant Pages
|
|