mirror of
https://github.com/apache/nuttx.git
synced 2026-05-20 04:16:35 +08:00
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 <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Petro Karashchenko
parent
d7b4e91dda
commit
4051fcd42b
@@ -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) &&
|
||||
|
||||
@@ -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) &&
|
||||
|
||||
Reference in New Issue
Block a user