Thread (6 messages) 6 messages, 4 authors, 2021-12-09

Re: [PATCH] perf dlfilter: Drop unused variable

From: Salvatore Bonaccorso <hidden>
Date: 2021-12-08 11:12:04
Also in: lkml

Hi German,

On Wed, Dec 08, 2021 at 10:44:01AM +0000, German Gomez wrote:
On 23/11/2021 21:18, Salvatore Bonaccorso wrote:
quoted
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 <redacted>
Only when passing -Wall (this is the case when building the kernel packages in
Debian with additional flags, so this is why this was spotted):

gcc -Wall -c -Iinclude  -o dlfilters/dlfilter-test-api-v0.o -fpic dlfilters/dlfilter-test-api-v0.c
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;
      |

Regards,
Salvatore
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help