[<prev] [next>] [day] [month] [year] [list]
Date: Wed, 9 Sep 2015 08:27:38 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Matthias Tafelmeier <matthias.tafelmeier@....net>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"hagen@...u.net" <hagen@...u.net>,
"shemminger@...l.org" <shemminger@...l.org>,
"fw@...len.de" <fw@...len.de>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"daniel@...earbox.net" <daniel@...earbox.net>
Subject: Re: [PATCH v5 02/10] ss: created formatters for json and hr
On Tue, 1 Sep 2015 17:57:15 +0000
Matthias Tafelmeier <matthias.tafelmeier@....net> wrote:
> diff --git a/misc/ss_out_fmt.h b/misc/ss_out_fmt.h
> new file mode 100644
> index 0000000..fa29cec
> --- /dev/null
> +++ b/misc/ss_out_fmt.h
> @@ -0,0 +1,82 @@
> +#ifndef SS_OUT_FMT_H
> +#define SS_OUT_FMT_H
> +
> +#include "ss_hr_fmt.h"
> +#include "ss_json_fmt.h"
> +#include "ss_types.h"
> +#include <linux/inet_diag.h>
> +#include <linux/pkt_sched.h>
> +#include <linux/filter.h>
> +#include <linux/netdevice.h>
> +#include <linux/packet_diag.h>
> +
> +#define GENERIC_DETAIL 0
> +#define NETLINK_DETAIL 1
> +
> +#define STATIC_ASSERT(COND, MSG) char STATIC_ASSERT##MSG[(COND) ? 1 : -1]
This form of ASSERT generates unused variable warnings and is unacceptable.
Could you instead do something like kernel and other code.
/**
* Triggers an error at compilation time if the condition is true.
*/
#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
#endif
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists