aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/support
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2015-12-09 19:24:04 -0800
committerGravatar Jan Tattermusch <jtattermusch@google.com>2015-12-09 19:24:04 -0800
commit06ae5cd48c1e235b0980cfca631c94572c7777d8 (patch)
tree0a471007f2c315718167e9236812ca840ad892b4 /test/core/support
parentcc0dd226c6463ea9a8d0f39d256746a7f918a597 (diff)
get rid of warnings on linux
Diffstat (limited to 'test/core/support')
-rw-r--r--test/core/support/string_test.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/core/support/string_test.c b/test/core/support/string_test.c
index 0ae930fa61..c97d3176c5 100644
--- a/test/core/support/string_test.c
+++ b/test/core/support/string_test.c
@@ -33,6 +33,7 @@
#include "src/core/support/string.h"
+#include <limits.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
@@ -306,7 +307,7 @@ static void test_ltoa() {
/* large negative - we don't know the size of long in advance */
GPR_ASSERT(gpr_asprintf(&str, "%lld", (long long)LONG_MIN));
- GPR_ASSERT(strlen(str) == gpr_ltoa(LONG_MIN, buf));
+ GPR_ASSERT(strlen(str) == (size_t)gpr_ltoa(LONG_MIN, buf));
GPR_ASSERT(0 == strcmp(str, buf));
gpr_free(str);
}
@@ -329,7 +330,7 @@ static void test_int64toa() {
GPR_ASSERT(0 == strcmp("9223372036854775807", buf));
/* large negative */
- GPR_ASSERT(20 == gpr_int64toa(-9223372036854775808LL, buf));
+ GPR_ASSERT(20 == gpr_int64toa(-9223372036854775807LL - 1, buf));
GPR_ASSERT(0 == strcmp("-9223372036854775808", buf));
}