diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-05-17 15:16:24 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-05-19 20:26:56 +0200 |
commit | 7c03edf2fe66855a8ce8f2575c3aaf66af975377 (patch) | |
tree | 7e793f937b759c8808668c8924b71a962f9b21f8 /client/mysqltest.cc | |
parent | 335c4ab790254462753ba4ed8b074c5847b2708f (diff) | |
download | mariadb-git-7c03edf2fe66855a8ce8f2575c3aaf66af975377.tar.gz |
MDEV-6262 analyze the coverity report on mariadb
uploaded 10.0, analyzed everything with the Impact=High
(and a couple of Medium)
Diffstat (limited to 'client/mysqltest.cc')
-rw-r--r-- | client/mysqltest.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc index d903484bd4d..f9715bfbfdb 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -1721,13 +1721,12 @@ void log_msg(const char *fmt, ...) int cat_file(DYNAMIC_STRING* ds, const char* filename) { int fd; - size_t len; + int len; char buff[16384]; if ((fd= my_open(filename, O_RDONLY, MYF(0))) < 0) return 1; - while((len= my_read(fd, (uchar*)&buff, - sizeof(buff)-1, MYF(0))) > 0) + while((len= (int)my_read(fd, (uchar*)&buff, sizeof(buff)-1, MYF(0))) > 0) { char *p= buff, *start= buff,*end=buff+len; while (p < end) |