[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <878r3eyoku.fsf@>
Date: Wed, 21 Feb 2024 13:44:01 +0100
From: Nicolai Stange <nstange@...e.de>
To: Shresth Prasad <shresthprasad7@...il.com>
Cc: zhangwarden@...il.com, jikos@...nel.org, joe.lawrence@...hat.com,
jpoimboe@...nel.org, linux-kernel-mentees@...ts.linuxfoundation.org,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
live-patching@...r.kernel.org, mbenes@...e.cz, mpdesouza@...e.com,
pmladek@...e.com, shuah@...nel.org, skhan@...uxfoundation.org
Subject: Re: [PATCH] Fix implicit cast warning in test_klp_state.c
Shresth Prasad <shresthprasad7@...il.com> writes:
> 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 cast [-Wint-conversion]
> 38 | loglevel_state = klp_get_state(&patch, CONSOLE_LOGLEVEL_STATE);
> | ^
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.
Thanks,
Nicolai
--
SUSE Software Solutions Germany GmbH, Frankenstraße 146, 90461 Nürnberg, Germany
GF: Ivo Totev, Andrew McDonald, Werner Knoblich
(HRB 36809, AG Nürnberg)
Powered by blists - more mailing lists