[rtems-lwip commit] rtemslwip/sys_arch.c: Initialize variable

Joel Sherrill joel at rtems.org
Fri Jan 5 17:29:47 UTC 2024


Module:    rtems-lwip
Branch:    master
Commit:    f1479f8bca78ccd59d1c3f82d017177cf9332ad9
Changeset: http://git.rtems.org/rtems-lwip/commit/?id=f1479f8bca78ccd59d1c3f82d017177cf9332ad9

Author:    Bernd Moessner <berndmoessner80 at gmail.com>
Date:      Wed Jan  3 19:22:07 2024 +0100

rtemslwip/sys_arch.c: Initialize variable

This silences a warning that isn't actually a bug since the variable is
set before use under a few layers of macro calls.

---

 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 );



More information about the vc mailing list