From: Ruben Kerkhof Date: Wed, 20 Feb 2019 11:06:27 +0000 (+0100) Subject: oauth.c: fix compiler warning X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=6f2b3abac8ab809d6b0aea58a873bd00c2be4dcc;p=collectd.git oauth.c: fix compiler warning make[1]: Entering directory '/home/ruben/src/collectd' CC src/utils/oauth/liboauth_la-oauth.lo src/utils/oauth/oauth.c: In function ‘get_assertion’: src/utils/oauth/oauth.c:283:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 283 | else if (status >= buffer_size) | ^~ --- diff --git a/src/utils/oauth/oauth.c b/src/utils/oauth/oauth.c index 671de84d..4b31056d 100644 --- a/src/utils/oauth/oauth.c +++ b/src/utils/oauth/oauth.c @@ -280,7 +280,7 @@ static int get_assertion(oauth_t *auth, char *buffer, status = snprintf(buffer, buffer_size, "%s.%s.%s", header, claim, signature); if (status < 1) return -1; - else if (status >= buffer_size) + else if ((size_t)status >= buffer_size) return ENOMEM; return 0;