This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch pr402 in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 115ccf5a5ce9e4fb0c59f274f56b24be99db9dab Author: Joshua Lange <[email protected]> AuthorDate: Fri Feb 21 14:06:57 2020 -0600 Fixed compiler warning about possibly uninitialized variable. --- arch/arm/src/stm32h7/stm32_ethernet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/src/stm32h7/stm32_ethernet.c b/arch/arm/src/stm32h7/stm32_ethernet.c index e2002f8..a3d1974 100644 --- a/arch/arm/src/stm32h7/stm32_ethernet.c +++ b/arch/arm/src/stm32h7/stm32_ethernet.c @@ -1660,7 +1660,7 @@ static void stm32_freesegment(struct stm32_ethmac_s *priv, static int stm32_recvframe(struct stm32_ethmac_s *priv) { struct eth_desc_s *rxdesc; - struct eth_desc_s *rxcurr; + struct eth_desc_s *rxcurr = NULL; uint8_t *buffer; int i; @@ -1818,6 +1818,7 @@ static int stm32_recvframe(struct stm32_ethmac_s *priv) { /* Drop the context descriptors, we are not interested */ + DEBUGASSERT(rxcurr != NULL); stm32_freesegment(priv, rxcurr, 1); }
