mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
test: fix -Wformat warnings in inspector cctest
Print size_t and ssize_t using %zd and %zu respectively, not %ld. PR-URL: https://github.com/nodejs/node/pull/8034 Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
4cd3090056
commit
ae2c344844
1 file changed
+3
-3
@@ -131,7 +131,7 @@ static void check_data_cb(read_expects* expectation, ssize_t nread,
|
||||
c = expectation->expected[expectation->pos++];
|
||||
actual = buf->base[i];
|
||||
if (c != actual) {
|
||||
fprintf(stderr, "Unexpected character at position %ld\n",
|
||||
fprintf(stderr, "Unexpected character at position %zd\n",
|
||||
expectation->pos - 1);
|
||||
GTEST_ASSERT_EQ(c, actual);
|
||||
}
|
||||
@@ -171,7 +171,7 @@ static void fail_callback(uv_stream_t* stream, ssize_t nread,
|
||||
if (nread < 0) {
|
||||
fprintf(stderr, "IO error: %s\n", uv_strerror(nread));
|
||||
} else {
|
||||
fprintf(stderr, "Read %ld bytes\n", nread);
|
||||
fprintf(stderr, "Read %zd bytes\n", nread);
|
||||
}
|
||||
ASSERT_TRUE(false); // Shouldn't have been called
|
||||
}
|
||||
@@ -262,7 +262,7 @@ static void expect_on_server(const char* data, size_t len) {
|
||||
char actual = expects->actual_data[expects->actual_offset++];
|
||||
char expected = data[i];
|
||||
if (expected != actual) {
|
||||
fprintf(stderr, "Character %ld:\n", i);
|
||||
fprintf(stderr, "Character %zu:\n", i);
|
||||
GTEST_ASSERT_EQ(expected, actual);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user