Commit 4f59b65f authored by Olivier Bertrand's avatar Olivier Bertrand

- Remove some gcc warnings

modified:
  storage/connect/filamvct.cpp
  storage/connect/ha_connect.cc
parent 554746af
...@@ -387,15 +387,20 @@ bool VCTFAM::MakeEmptyFile(PGLOBAL g, char *fn) ...@@ -387,15 +387,20 @@ bool VCTFAM::MakeEmptyFile(PGLOBAL g, char *fn)
n = (Header == 1 || Header == 3) ? sizeof(VECHEADER) : 0; n = (Header == 1 || Header == 3) ? sizeof(VECHEADER) : 0;
if (lseek(h, n + MaxBlk * Nrec * Lrecl - 1, SEEK_SET) == -1) { if (lseek(h, n + MaxBlk * Nrec * Lrecl - 1, SEEK_SET) < 0)
sprintf(g->Message, MSG(MAKE_EMPTY_FILE), To_File, strerror(errno)); goto err;
close(h);
return true; // This actually fills the empty file
} // endif h if (write(h, &c, 1) < 0)
goto err;
write(h, &c, 1); // This actually fills the empty file
close(h); close(h);
return false; return false;
err:
sprintf(g->Message, MSG(MAKE_EMPTY_FILE), To_File, strerror(errno));
close(h);
return true;
} // end of MakeEmptyFile } // end of MakeEmptyFile
/***********************************************************************/ /***********************************************************************/
...@@ -3392,15 +3397,20 @@ bool BGVFAM::MakeEmptyFile(PGLOBAL g, char *fn) ...@@ -3392,15 +3397,20 @@ bool BGVFAM::MakeEmptyFile(PGLOBAL g, char *fn)
htrc("MEF: pos=%lld n=%d maxblk=%d blksize=%d\n", htrc("MEF: pos=%lld n=%d maxblk=%d blksize=%d\n",
pos, n, MaxBlk, Blksize); pos, n, MaxBlk, Blksize);
if (lseek64(h, pos, SEEK_SET) < 0) { if (lseek64(h, pos, SEEK_SET) < 0)
sprintf(g->Message, MSG(MAKE_EMPTY_FILE), To_File, strerror(errno)); goto err;
close(h);
return true;
} // endif h
write(h, &c, 1); // This actually fills the empty file // This actually fills the empty file
if (write(h, &c, 1) < 0)
goto err;
close(h); close(h);
return false; return false;
err:
sprintf(g->Message, MSG(MAKE_EMPTY_FILE), To_File, strerror(errno));
close(h);
return true;
#endif // !WIN32 #endif // !WIN32
} // end of MakeEmptyFile } // end of MakeEmptyFile
......
...@@ -207,17 +207,18 @@ static my_bool indx_map= 0; ...@@ -207,17 +207,18 @@ static my_bool indx_map= 0;
/* Utility functions. */ /* Utility functions. */
/***********************************************************************/ /***********************************************************************/
PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char *tab, char *db, bool info); PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char *tab, char *db, bool info);
void PushWarning(PGLOBAL g, THD *thd, int level); void PushWarning(PGLOBAL g, THD *thd, int level);
bool CheckSelf(PGLOBAL g, TABLE_SHARE *s, const char *host, bool CheckSelf(PGLOBAL g, TABLE_SHARE *s, const char *host,
const char *db, char *tab, const char *src, int port); const char *db, char *tab, const char *src, int port);
bool ExactInfo(void);
USETEMP UseTemp(void);
static PCONNECT GetUser(THD *thd, PCONNECT xp); static PCONNECT GetUser(THD *thd, PCONNECT xp);
static PGLOBAL GetPlug(THD *thd, PCONNECT& lxp); static PGLOBAL GetPlug(THD *thd, PCONNECT& lxp);
static handler *connect_create_handler(handlerton *hton, static handler *connect_create_handler(handlerton *hton,
TABLE_SHARE *table, TABLE_SHARE *table,
MEM_ROOT *mem_root); MEM_ROOT *mem_root);
static int connect_assisted_discovery(handlerton *hton, THD* thd, static int connect_assisted_discovery(handlerton *hton, THD* thd,
TABLE_SHARE *table_s, TABLE_SHARE *table_s,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment