Fixed compiler warning format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=] by casting or increasing format specifier size and casting. (#1092)
* Fixed compiler warning format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=] by casting or increasing format specifier size and casting. Increased the size of the name string to handle larger possible integers.
* Fixed copied code that no longer needs static function scope variables for text names.
This commit is contained in:
+1
-1
@@ -93,7 +93,7 @@ void bip6_set_interface(char *ifname)
|
||||
Hints.ai_socktype = SOCK_DGRAM;
|
||||
Hints.ai_protocol = IPPROTO_UDP;
|
||||
Hints.ai_flags = AI_NUMERICHOST | AI_PASSIVE;
|
||||
snprintf(port, sizeof(port), "%u", BIP6_Addr.port);
|
||||
snprintf(port, sizeof(port), "%u", (unsigned)BIP6_Addr.port);
|
||||
if (BIP6_Debug) {
|
||||
debug_fprintf(
|
||||
stderr, "BIP6: seeking IPv6 address %s port %s...\n", ifname, port);
|
||||
|
||||
Reference in New Issue
Block a user