linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Ian Rogers <irogers@google.com>
Cc: linux-trace-devel@vger.kernel.org,
	Tzvetomir Stoyanov <tz.stoyanov@gmail.com>
Subject: Re: [PATCH] libtraceevent: Fix for print_field
Date: Tue, 12 Oct 2021 14:24:54 -0400	[thread overview]
Message-ID: <20211012142454.16459432@gandalf.local.home> (raw)
In-Reply-To: <20210920183715.33377-1-irogers@google.com>

On Mon, 20 Sep 2021 11:37:15 -0700
Ian Rogers <irogers@google.com> wrote:

> Correct a typo in an operator which resolves a clang warning:
> 
> src/event-parse.c:5408:41: error: converting the enum constant to a boolean [-Werror,-Wint-in-bool-context]
>         if (field->flags & (TEP_FIELD_IS_ARRAY || TEP_FIELD_IS_STRING))
>                                                ^
> 
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
>  src/event-parse.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/event-parse.c b/src/event-parse.c
> index 8057fb5..7063758 100644
> --- a/src/event-parse.c
> +++ b/src/event-parse.c
> @@ -5405,7 +5405,7 @@ void static inline print_field(struct trace_seq *s, void *data,
>  	if (!parse || event->flags & TEP_EVENT_FL_FAILED)
>  		goto out;
>  
> -	if (field->flags & (TEP_FIELD_IS_ARRAY || TEP_FIELD_IS_STRING))
> +	if (field->flags & (TEP_FIELD_IS_ARRAY | TEP_FIELD_IS_STRING))

Bah, I should have caught this in my review.

Another example of the usefulness of clang errors.

Applied, thanks Ian!

-- Steve

>  		goto out;
>  
>  	start_parse = parse;


      parent reply	other threads:[~2021-10-12 18:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-20 18:37 [PATCH] libtraceevent: Fix for print_field Ian Rogers
2021-09-27 21:17 ` Ian Rogers
2021-09-27 22:02   ` Steven Rostedt
2021-10-12 18:24 ` Steven Rostedt [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=20211012142454.16459432@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=irogers@google.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=tz.stoyanov@gmail.com \
    /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).