netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Matthias Tafelmeier <matthias.tafelmeier@gmx.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"hagen@jauu.net" <hagen@jauu.net>,
	"shemminger@osdl.org" <shemminger@osdl.org>,
	"fw@strlen.de" <fw@strlen.de>,
	"edumazet@google.com" <edumazet@google.com>,
	"daniel@iogearbox.net" <daniel@iogearbox.net>
Subject: Re: [PATCH v5 02/10] ss: created formatters for json and hr
Date: Wed, 9 Sep 2015 08:27:38 -0700	[thread overview]
Message-ID: <20150909082738.19b52ea9@urahara> (raw)
In-Reply-To: <a84873c9a97b40868529f203587ecfc5@HQ1WP-EXMB11.corp.brocade.com>

On Tue, 1 Sep 2015 17:57:15 +0000
Matthias Tafelmeier <matthias.tafelmeier@gmx.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

      parent reply	other threads:[~2015-09-09 15:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-01 17:57 iproute2 v5: full ss json support and general output simplification Matthias Tafelmeier
2015-09-01 17:57 ` [PATCH v5 01/10] ss: rooted out ss type declarations for output formatters Matthias Tafelmeier
2015-09-01 17:57 ` [PATCH v5 02/10] ss: created formatters for json and hr Matthias Tafelmeier
2015-09-01 17:57 ` [PATCH v5 03/10] ss: removed obsolet fmt functions Matthias Tafelmeier
2015-09-01 17:57 ` [PATCH v5 04/10] ss: prepare timer for output handler usage Matthias Tafelmeier
2015-09-01 17:57 ` [PATCH v5 05/10] ss: replaced old output with new generic output mechanisms Matthias Tafelmeier
2015-09-01 17:57 ` [PATCH v5 06/10] ss: renaming and export of current_filter Matthias Tafelmeier
2015-09-01 17:57 ` [PATCH v5 07/10] ss: symmetrical subhandler output extension example Matthias Tafelmeier
2015-09-01 17:57 ` [PATCH v5 08/10] ss: symmetrical formatter " Matthias Tafelmeier
2015-09-01 17:57 ` [PATCH v5 09/10] ss: fixed free on local array for valid json output Matthias Tafelmeier
2015-09-01 17:57 ` [PATCH v5 10/10] ss: activate json_writer excluded logic Matthias Tafelmeier
     [not found] ` <a84873c9a97b40868529f203587ecfc5@HQ1WP-EXMB11.corp.brocade.com>
2015-09-09 15:27   ` Stephen Hemminger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150909082738.19b52ea9@urahara \
    --to=stephen@networkplumber.org \
    --cc=daniel@iogearbox.net \
    --cc=edumazet@google.com \
    --cc=fw@strlen.de \
    --cc=hagen@jauu.net \
    --cc=matthias.tafelmeier@gmx.net \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).