Skip to content

Commit

Permalink
network: fix snprintf format string for MinGW
Browse files Browse the repository at this point in the history
MinGW build fail on unsigned int argument because long unsigned
int is expected.

Signed-off-by: Raluca Groza <raluca.groza@analog.com>
  • Loading branch information
ccraluca authored and pcercuei committed Jul 3, 2023
1 parent 28e1b30 commit 25714d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion network.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ static char * network_get_description(struct addrinfo *res)
if (errno == 0) {
/* Windows uses numerical interface identifiers */
ptr = description + strnlen(description, len) + 1;
iio_snprintf(ptr, IF_NAMESIZE, "%u", in->sin6_scope_id);
iio_snprintf(ptr, IF_NAMESIZE, "%u", (unsigned int)in->sin6_scope_id);
} else
#endif
{
Expand Down

0 comments on commit 25714d1

Please sign in to comment.