libtraceevent: Fix for print_field
PATCH 1/1 libtraceevent: Fix for print_field
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))
^--- src/event-parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/event-parse.c +1 -1
@@ -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 )) goto out; start_parse = parse;
Signature · 1 line
2.33.0.464.g1972c5931b-goog
Quoted 7 lines · Ian Rogers
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 <[email protected]>
Ping. Thanks,
Ian
Quoted 20 lines
--- src/event-parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)src/event-parse.c +1
-2@@ -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 )) goto out; start_parse = parse; --2.33.0.464.g1972c5931b-goog
Quoted 2 lines · On Mon, 27 Sep 2021 14:17:58 -0700 Ian Rogers <[email protected]> wrote:
Ping. Thanks,
Ian
Hi Ian,
I'm currently traveling, but when I get back, I'll be going through the queue.
Your patch is in the queue, and you can check the status here:
https://patchwork.kernel.org/project/linux-trace-devel/patch/[email protected]/
Thanks!
-- Steve
Steven Rostedt
AppliedQuoted 16 lines · On Mon, 20 Sep 2021 11:37:15 -0700 Ian Rogers <[email protected]> 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 <[email protected]>--- src/event-parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)src/event-parse.c +0
-0
src/event-parse.c void static inline print_field(struct trace_seq *s, void *data, · line 5408
Quoted 5 lines
src/event-parse.c +1
-1@@ -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
Quoted 3 lines
src/event-parse.c +0
-0goto out; start_parse = parse;