aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-06-08 11:57:04 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-06-08 15:00:43 +0200
commitf8e02042cf5392278c41e4714fc051175da8f7fd (patch)
tree1abde5d80f84072d5b2d24b48583416bd872a6c3 /tests
parent8252476fc8c8bdcacbea41f886f085746df9016a (diff)
downloadlibpam-x2go-f8e02042cf5392278c41e4714fc051175da8f7fd.tar.gz
libpam-x2go-f8e02042cf5392278c41e4714fc051175da8f7fd.tar.bz2
libpam-x2go-f8e02042cf5392278c41e4714fc051175da8f7fd.zip
tests/mock_guest.c: Use same integer type (long unsigned int) for comparing string length returned by snprintf() and a sizeof() return value.
This resolves: mock_guest.c: In function 'socket_sucker': mock_guest.c:95:16: error: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Werror=sign-compare] 95 | if (printsize > sizeof(serv_addr.sun_path) - 1 || printsize < 0) { | ^
Diffstat (limited to 'tests')
-rw-r--r--tests/mock_guest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/mock_guest.c b/tests/mock_guest.c
index 6353ee1..6bdfc6f 100644
--- a/tests/mock_guest.c
+++ b/tests/mock_guest.c
@@ -92,7 +92,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, ".x2go-socket");
+ long unsigned int printsize = (long unsigned int)snprintf(serv_addr.sun_path, sizeof(serv_addr.sun_path) - 1, "%s/%s", home, ".x2go-socket");
if (printsize > sizeof(serv_addr.sun_path) - 1 || printsize < 0) {
return -1;
}