From 0294977b5458ee2c0ba77b6b2b94fb4a4d6a1310 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 8 Jun 2021 15:55:28 +0200 Subject: tests/mock_guest.c: Use same integer type (long unsigned int) for comparing string length returned by snprintf() and a sizeof() return value. --- tests/mock_guest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/mock_guest.c b/tests/mock_guest.c index 218f30e..4d10bfb 100644 --- a/tests/mock_guest.c +++ b/tests/mock_guest.c @@ -89,7 +89,7 @@ socket_sucker () serv_addr.sun_family = AF_UNIX; - int printsize = snprintf(serv_addr.sun_path, sizeof(serv_addr.sun_path) - 1, "%s/%s", home, ".freerdp2-socket"); + unsigned long int printsize = (unsigned long int)snprintf(serv_addr.sun_path, sizeof(serv_addr.sun_path) - 1, "%s/%s", home, ".freerdp2-socket"); if (printsize > sizeof(serv_addr.sun_path) - 1 || printsize < 0) { return -1; } -- cgit v1.2.3