This is an automated email from the ASF dual-hosted git repository. pkarashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 4051fcd42b1f87e096cb5cf9bba28854cb515571 Author: Xiang Xiao <[email protected]> AuthorDate: Wed Oct 26 04:13:03 2022 +0800 include/endian.h: Fix format specifies type 'unsigned long' but the argument has type 'unsigned int' Error: route/net_del_ramroute.c:94:9: error: format specifies type 'unsigned long' but the argument has type 'unsigned int' [-Werror,-Wformat] HTONL(match->target), HTONL(match->netmask)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /github/workspace/sources/nuttx/include/debug.h:232:23: note: expanded from macro 'ninfo' ^ /github/workspace/sources/nuttx/include/debug.h:102:43: note: expanded from macro '_none' do { if (0) syslog(LOG_ERR, format, ##__VA_ARGS__); } while (0) ~~~~~~ ^~~~~~~~~~~ /github/workspace/sources/nuttx/include/netinet/in.h:233:17: note: expanded from macro 'HTONL' ^ /github/workspace/sources/nuttx/include/endian.h:63:25: note: expanded from macro '__swap_uint32' ^ Error: route/net_del_ramroute.c:94:31: error: format specifies type 'unsigned long' but the argument has type 'unsigned int' [-Werror,-Wformat] HTONL(match->target), HTONL(match->netmask)); ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /github/workspace/sources/nuttx/include/debug.h:232:23: note: expanded from macro 'ninfo' ^ /github/workspace/sources/nuttx/include/debug.h:102:43: note: expanded from macro '_none' do { if (0) syslog(LOG_ERR, format, ##__VA_ARGS__); } while (0) ~~~~~~ ^~~~~~~~~~~ /github/workspace/sources/nuttx/include/netinet/in.h:233:17: note: expanded from macro 'HTONL' ^ /github/workspace/sources/nuttx/include/endian.h:63:25: note: expanded from macro '__swap_uint32' Signed-off-by: Xiang Xiao <[email protected]> --- net/route/net_del_fileroute.c | 2 +- net/route/net_del_ramroute.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/route/net_del_fileroute.c b/net/route/net_del_fileroute.c index 1eed9a5a13..dff88fe7df 100644 --- a/net/route/net_del_fileroute.c +++ b/net/route/net_del_fileroute.c @@ -95,7 +95,7 @@ static int net_match_ipv4(FAR struct net_route_ipv4_s *route, FAR void *arg) net_ipv4_dumproute("Comparing", route); ninfo("With:\n"); - ninfo(" target=%08lx netmask=%08lx\n", + ninfo(" target=%08" PRIx32 " netmask=%08" PRIx32 "\n", HTONL(match->target), HTONL(match->netmask)); if (net_ipv4addr_maskcmp(route->target, match->target, match->netmask) && diff --git a/net/route/net_del_ramroute.c b/net/route/net_del_ramroute.c index a6b334f879..5914dd46d2 100644 --- a/net/route/net_del_ramroute.c +++ b/net/route/net_del_ramroute.c @@ -90,7 +90,7 @@ static int net_match_ipv4(FAR struct net_route_ipv4_s *route, FAR void *arg) net_ipv4_dumproute("Comparing", route); ninfo("With:\n"); - ninfo(" target=%08" PRIu32 " netmask=%08" PRIu32 "\n", + ninfo(" target=%08" PRIx32 " netmask=%08" PRIx32 "\n", HTONL(match->target), HTONL(match->netmask)); if (net_ipv4addr_maskcmp(route->target, match->target, match->netmask) &&
