[PATCH rtems-lwip - v1 04/11] FIX: warning variable might be used without initialization
Bernd Moessner
berndmoessner80 at gmail.com
Thu Jan 4 22:08:33 UTC 2024
On 04.01.2024 22:41, Kinsey Moore wrote:
> This is technically a false warning since rtems_interrupt_disable is a
> macro that expands to _ISR_Local_disable that expands to
> _CPU_ISR_Disable which assigns it a value, but it doesn't hurt
> anything, so it's OK to commit.
>
> Kinsey
>
> On Thu, Jan 4, 2024 at 12:54 PM <berndmoessner80 at gmail.com> wrote:
>
> From: Bernd Moessner <berndmoessner80 at gmail.com>
>
> ---
> rtemslwip/common/sys_arch.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/rtemslwip/common/sys_arch.c b/rtemslwip/common/sys_arch.c
> index 2651c9c..b97404c 100644
> --- a/rtemslwip/common/sys_arch.c
> +++ b/rtemslwip/common/sys_arch.c
> @@ -372,7 +372,7 @@ sys_request_irq(unsigned int irqnum,
> sys_irq_handler_t handler,
> sys_prot_t
> sys_arch_protect()
> {
> - sys_prot_t pval;
> + sys_prot_t pval = 0;
>
> #if RTEMS_SMP
> rtems_recursive_mutex_lock( &sys_arch_lock );
> --
> 2.34.1
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
Yes, I saw that it doesnt hurt. I get similar warnings from the RTEMS
Kernel. However, I will have to "fix" this warnings as I am required to
enable -Werror.
Bernd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20240104/f3a80769/attachment-0001.htm>
More information about the devel
mailing list