From 6f2b3abac8ab809d6b0aea58a873bd00c2be4dcc Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Wed, 20 Feb 2019 12:06:27 +0100 Subject: [PATCH] oauth.c: fix compiler warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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) | ^~ --- src/utils/oauth/oauth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.11.0