summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Kosov <claprix@yandex.ru>2019-08-26 19:19:12 +0300
committerEugene Kosov <claprix@yandex.ru>2019-08-28 10:14:20 +0300
commitd4866c7d0db3183b6b3d828130ccd8fb9a98600b (patch)
tree66ff134faf185a8af09d43fd979914d9117da394
parentf608713739ef60af2cca599dc1017112fe757d83 (diff)
downloadmariadb-git-d4866c7d0db3183b6b3d828130ccd8fb9a98600b.tar.gz
fix clang warnings
-rw-r--r--include/my_time.h2
-rw-r--r--storage/connect/ha_connect.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/my_time.h b/include/my_time.h
index 6e4a625f2c0..3e0ae914142 100644
--- a/include/my_time.h
+++ b/include/my_time.h
@@ -118,7 +118,7 @@ longlong number_to_datetime(longlong nr, ulong sec_part, MYSQL_TIME *time_res,
static inline
longlong double_to_datetime(double nr, MYSQL_TIME *ltime, uint flags, int *cut)
{
- if (nr < 0 || nr > LONGLONG_MAX)
+ if (nr < 0 || nr > (double)LONGLONG_MAX)
nr= (double)LONGLONG_MAX;
return number_to_datetime((longlong) floor(nr),
(ulong)((nr-floor(nr))*TIME_SECOND_PART_FACTOR),
diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc
index fc65c578e8d..40f9e90ff35 100644
--- a/storage/connect/ha_connect.cc
+++ b/storage/connect/ha_connect.cc
@@ -1317,7 +1317,7 @@ char *ha_connect::GetRealString(PCSZ s)
{
char *sv;
- if (IsPartitioned() && s && partname && *partname) {
+ if (IsPartitioned() && s && *partname) {
sv= (char*)PlugSubAlloc(xp->g, NULL, 0);
sprintf(sv, s, partname);
PlugSubAlloc(xp->g, NULL, strlen(sv) + 1);