mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-19 15:03:45 +08:00
Replace snprintf by strncpy (fix compiler warning)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
209c1df599
commit
e46141ac99
@ -47,7 +47,7 @@ TEST(InputBufferTest, Read) {
|
||||
const int kMaxBufSize = 128;
|
||||
char buffer[kMaxBufSize];
|
||||
auto s = "Hello\n world!";
|
||||
snprintf(buffer, kMaxBufSize, s);
|
||||
strncpy(buffer, s, kMaxBufSize);
|
||||
EXPECT_STREQ(s, buffer);
|
||||
FILE* fp = tmpfile();
|
||||
CHECK(fp != nullptr);
|
||||
|
Loading…
Reference in New Issue
Block a user