[openib-general] Re: at won't compile with gcc-2.95
Hal Rosenstock
halr at voltaire.com
Fri Sep 2 16:08:53 PDT 2005
On Thu, 2005-09-01 at 13:32, Roland Dreier wrote:
> > Not sure yet on what gcc 2.95 doesn't like about:
> > #define WARN(fmt, arg ...) printk("ib_at: %s: " fmt "\n", __FUNCTION__, ## arg);
> > but that is the cause of the other compile issue in at.c.
>
> Probably it doesn't like the extra space in WARN(fmt, arg ...).
> Hmm... changing it to
>
> #define WARN(fmt, arg...) printk("ib_at: %s: " fmt "\n", __FUNCTION__, ## arg);
>
> fixes the original complaint, but then gcc 2.95 doesn't like things like:
>
> WARN("pending request not found in parent request!");
>
> ie WARN() with no arg parameter. Not sure how to make gcc 2.95 happy
> about that...
Can you try the following patch with gcc 2.95 and let me know if this
works ? Thanks.
-- Hal
Use __VA_ARGS__ so will build with gcc-2.95
Signed-off-by: Hal Rosenstock <halr at voltaire.com>
Index: at_priv.h
===================================================================
--- at_priv.h (revision 3295)
+++ at_priv.h (working copy)
@@ -137,9 +137,10 @@
#define DEBUG(fmt, ...) while (0) {}
#define DEBUG_VAR(x, y...)
-#define WARN(fmt, arg ...) printk("ib_at: %s: " fmt "\n",
__FUNCTION__, ## arg);
+#define WARN(fmt, ...) printk("ib_at: %s: " fmt "\n", __FUNCTION__, ##
__VA_ARGS__)
#define WARN_VAR(x, y...) x, ## y
-//#define DEBUG(fmt, arg ...) printk("ib_at: %s: " fmt "\n",
__FUNCTION__, ## arg);
+
+//#define DEBUG(fmt, ...) printk("ib_at: %s: " fmt "\n", __FUNCTION__,
## __VA_ARGS__)
//#define DEBUG_VAR(x, y...) x, ## y
static kmem_cache_t *route_req_cache = NULL;
More information about the general
mailing list