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 committed Jun 26, 2023
1 parent 8ab3029 commit e16dee2
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 e16dee2

Please sign in to comment.