From b3c9f7ba52dd3f832ac392e444d508ef5b6be6d8 Mon Sep 17 00:00:00 2001 From: Steve Kondik Date: Sat, 8 Jul 2017 02:08:43 -0700 Subject: [PATCH] rfb: vsnprintf returns an int, not size_t Fixes: /home/shade/dev/tigervnc/common/rfb/util.cxx:55:13: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare] if (len < 0) { ~~~ ^ ~ 1 error generated. --- common/rfb/util.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/rfb/util.cxx b/common/rfb/util.cxx index 22e00ffc..cfec2ef3 100644 --- a/common/rfb/util.cxx +++ b/common/rfb/util.cxx @@ -44,7 +44,7 @@ namespace rfb { void CharArray::format(const char *fmt, ...) { va_list ap; - size_t len; + int len; va_start(ap, fmt); len = vsnprintf(NULL, 0, fmt, ap); -- 2.39.5