This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 4da2eef7d2e53f6b85b9ad0700344495cd66ae92 Author: YAMAMOTO Takashi <yamam...@midokura.com> AuthorDate: Thu Nov 26 10:04:40 2020 +0900 arch/arm/src/stm32/stm32_eth.c: Fix syslog formats --- arch/arm/src/stm32/stm32_eth.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/arch/arm/src/stm32/stm32_eth.c b/arch/arm/src/stm32/stm32_eth.c index 03020f9..3fcf4ca 100644 --- a/arch/arm/src/stm32/stm32_eth.c +++ b/arch/arm/src/stm32/stm32_eth.c @@ -41,6 +41,7 @@ #include <nuttx/config.h> #if defined(CONFIG_NET) && defined(CONFIG_STM32_ETHMAC) +#include <inttypes.h> #include <stdint.h> #include <stdbool.h> #include <time.h> @@ -1068,7 +1069,7 @@ static int stm32_transmit(FAR struct stm32_ethmac_s *priv) txdesc = priv->txhead; txfirst = txdesc; - ninfo("d_len: %d d_buf: %p txhead: %p tdes0: %08x\n", + ninfo("d_len: %d d_buf: %p txhead: %p tdes0: %08" PRIx32 "\n", priv->dev.d_len, priv->dev.d_buf, txdesc, txdesc->tdes0); DEBUGASSERT(txdesc && (txdesc->tdes0 & ETH_TDES0_OWN) == 0); @@ -1678,7 +1679,7 @@ static int stm32_recvframe(FAR struct stm32_ethmac_s *priv) * scanning logic, and continue scanning with the next frame. */ - nerr("ERROR: Dropped, RX descriptor errors: %08x\n", + nerr("ERROR: Dropped, RX descriptor errors: %08" PRIx32 "\n", rxdesc->rdes0); stm32_freesegment(priv, rxcurr, priv->segments); } @@ -1912,7 +1913,8 @@ static void stm32_freeframe(FAR struct stm32_ethmac_s *priv) * TX descriptors. */ - ninfo("txtail: %p tdes0: %08x tdes2: %08x tdes3: %08x\n", + ninfo("txtail: %p tdes0: %08" PRIx32 + " tdes2: %08" PRIx32 " tdes3: %08" PRIx32 "\n", txdesc, txdesc->tdes0, txdesc->tdes2, txdesc->tdes3); DEBUGASSERT(txdesc->tdes2 != 0); @@ -2373,8 +2375,10 @@ static int stm32_ifup(struct net_driver_s *dev) #ifdef CONFIG_NET_IPv4 ninfo("Bringing up: %d.%d.%d.%d\n", - dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, - (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24); + (int)(dev->d_ipaddr & 0xff), + (int)((dev->d_ipaddr >> 8) & 0xff), + (int)((dev->d_ipaddr >> 16) & 0xff), + (int)(dev->d_ipaddr >> 24)); #endif #ifdef CONFIG_NET_IPv6 ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",