Browse Source

fix clang warnings

pull/1387/head
Eugene Kosov 6 years ago
parent
commit
d4866c7d0d
  1. 2
      include/my_time.h
  2. 2
      storage/connect/ha_connect.cc

2
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),

2
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);

Loading…
Cancel
Save