lkml.org 
[lkml]   [2021]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] perf dlfilter: Drop unused variable
From
Date

On 23/11/2021 21:18, Salvatore Bonaccorso wrote:
> Compiling tools/perf/dlfilters/dlfilter-test-api-v0.c result in:
>
> checking for stdlib.h... dlfilters/dlfilter-test-api-v0.c: In function ‘filter_event’:
> dlfilters/dlfilter-test-api-v0.c:311:29: warning: unused variable ‘d’ [-Wunused-variable]
> 311 | struct filter_data *d = data;
> |

Did you get this warning when issuing "make"? From my side, it generated
this gcc command so I didn't get it (make DEBUG=1):

  gcc -c -Iinclude  -o dlfilters/dlfilter-test-api-v0.o -fpic dlfilters/dlfilter-test-api-v0.c

Reviewed-by: German Gomez <german.gomez@arm.com>

Thanks,
German

>
> So remove the variable now.
>
> Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
> ---
> tools/perf/dlfilters/dlfilter-test-api-v0.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/tools/perf/dlfilters/dlfilter-test-api-v0.c b/tools/perf/dlfilters/dlfilter-test-api-v0.c
> index 7565a1852c74..b17eb52a0694 100644
> --- a/tools/perf/dlfilters/dlfilter-test-api-v0.c
> +++ b/tools/perf/dlfilters/dlfilter-test-api-v0.c
> @@ -308,8 +308,6 @@ int filter_event_early(void *data, const struct perf_dlfilter_sample *sample, vo
>
> int filter_event(void *data, const struct perf_dlfilter_sample *sample, void *ctx)
> {
> - struct filter_data *d = data;
> -
> pr_debug("%s API\n", __func__);
>
> return do_checks(data, sample, ctx, false);

\
 
 \ /
  Last update: 2021-12-08 11:45    [W:0.069 / U:0.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site