[PATCH rtems-lwip - v1 04/11] FIX: warning variable might be used without initialization

Kinsey Moore kinsey.moore at oarcorp.com
Thu Jan 4 21:41:27 UTC 2024


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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20240104/49f28698/attachment.htm>


More information about the devel mailing list