Re: [PATCH] Fix implicit cast warning in test_klp_state.c

2024-02-22 Thread Shresth Prasad
That sequence of steps fixed the warnings. Thank you so much! Regards, Shresth

Re: [PATCH] Fix implicit cast warning in test_klp_state.c

2024-02-22 Thread Shresth Prasad
>Is the declaration of klp_get_state() visible at that >point, i.e. is >there perhaps any warning about missing >declarations above that? > >Otherwise C rules would default to assume an 'int' >return type. I wasn't aware it works like that. You're right I do see some warnings about implicit funct

Re: [PATCH] Fix implicit cast warning in test_klp_state.c

2024-02-21 Thread Shresth Prasad
I checked the source code and yes I am on the latest Linux next repo. Here's the warning: /home/shresthp/dev/linux_work/linux_next/tools/testing/selftests/livepatch/test_modules/test_klp_state.c:38:24: warning: assignment to ‘struct klp_state *’ from ‘int’ makes pointer from integer without a ca

Re: [PATCH] Fix implicit cast warning in test_klp_state.c

2024-02-20 Thread Shresth Prasad
>What compiler version and architecture? Are you >compiling using flags like >W=1? >I would advise you to always add more information >about how the problem >manifests, and what you are executing. This can >help to nail down the issue >quicker. I'll keep that in mind. I'm on an x86_64 system wit

Re: [PATCH] Fix implicit cast warning in test_klp_state.c

2024-02-20 Thread Shresth Prasad
Looking at the function definition now, I do see that the function returns a struct pointer but for me the compiler still complains about an implicit conversion from int to struct pointer. Is there any particular reason why this might be happening? I couldn't quite figure it out myself as I am

[PATCH] Fix implicit cast warning in test_klp_state.c

2024-02-16 Thread Shresth Prasad
from integer without a cast [-Wint-conversion] on lines 38, 55, 68 and 80 of test_klp_state.c Signed-off-by: Shresth Prasad --- .../selftests/livepatch/test_modules/test_klp_state.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests