mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Fix gcc compiler warnings reported by Sergei
modified: storage/connect/array.cpp modified: storage/connect/array.h modified: storage/connect/blkfil.cpp modified: storage/connect/blkfil.h modified: storage/connect/block.h modified: storage/connect/colblk.cpp modified: storage/connect/colblk.h modified: storage/connect/csort.h modified: storage/connect/filamvct.cpp modified: storage/connect/filter.cpp modified: storage/connect/filter.h modified: storage/connect/global.h modified: storage/connect/json.h modified: storage/connect/plgdbsem.h modified: storage/connect/plgdbutl.cpp modified: storage/connect/tabcol.cpp modified: storage/connect/tabcol.h modified: storage/connect/tabdos.cpp modified: storage/connect/tabdos.h modified: storage/connect/tabjson.cpp modified: storage/connect/table.cpp modified: storage/connect/tabodbc.cpp modified: storage/connect/tabodbc.h modified: storage/connect/tabsys.h modified: storage/connect/tabxml.h modified: storage/connect/value.cpp modified: storage/connect/value.h modified: storage/connect/xindex.cpp modified: storage/connect/xindex.h modified: storage/connect/xobject.cpp modified: storage/connect/xobject.h modified: storage/connect/xtable.h Set values as nullable when retrieving catalog info modified: storage/connect/jdbconn.cpp modified: storage/connect/mysql-test/connect/r/odbc_oracle.result modified: storage/connect/odbconn.cpp Change format of Jpath modified: storage/connect/json.cpp modified: storage/connect/jsonudf.cpp modified: storage/connect/mysql-test/connect/r/json.result modified: storage/connect/mysql-test/connect/r/json_udf.result modified: storage/connect/mysql-test/connect/r/json_udf_bin.result modified: storage/connect/mysql-test/connect/r/zip.result modified: storage/connect/mysql-test/connect/t/json.test modified: storage/connect/mysql-test/connect/t/json_udf.test modified: storage/connect/mysql-test/connect/t/json_udf_bin.test modified: storage/connect/mysql-test/connect/t/zip.test modified: storage/connect/tabjson.cpp modified: storage/connect/tabjson.h modified: storage/connect/tabmgo.cpp Change null representation from ??? to <null> modified: storage/connect/json.cpp Change the name of UDF that are equal to a native JSON function name modified: storage/connect/jsonudf.cpp modified: storage/connect/jsonudf.h modified: storage/connect/mysql-test/connect/t/json_udf.inc modified: storage/connect/mysql-test/connect/t/json_udf2.inc Fix bug in making JSON project info modified: storage/connect/mongofam.cpp Fix COMPUTE when one argument is null modified: storage/connect/value.cpp Value is null only when nullable modified: storage/connect/value.h
This commit is contained in:
@@ -68,9 +68,9 @@ class LIBXMLDOC : public XMLDOCUMENT {
|
||||
virtual void SetNofree(bool b) {Nofreelist = b;}
|
||||
|
||||
// Methods
|
||||
virtual bool Initialize(PGLOBAL g, char *entry, bool zipped);
|
||||
virtual bool Initialize(PGLOBAL g, PCSZ entry, bool zipped);
|
||||
virtual bool ParseFile(PGLOBAL g, char *fn);
|
||||
virtual bool NewDoc(PGLOBAL g, char *ver);
|
||||
virtual bool NewDoc(PGLOBAL g, PCSZ ver);
|
||||
virtual void AddComment(PGLOBAL g, char *com);
|
||||
virtual PXNODE GetRoot(PGLOBAL g);
|
||||
virtual PXNODE NewRoot(PGLOBAL g, char *name);
|
||||
@@ -119,9 +119,9 @@ class XML2NODE : public XMLNODE {
|
||||
virtual PXLIST SelectNodes(PGLOBAL g, char *xp, PXLIST lp);
|
||||
virtual PXNODE SelectSingleNode(PGLOBAL g, char *xp, PXNODE np);
|
||||
virtual PXATTR GetAttribute(PGLOBAL g, char *name, PXATTR ap);
|
||||
virtual PXNODE AddChildNode(PGLOBAL g, char *name, PXNODE np);
|
||||
virtual PXNODE AddChildNode(PGLOBAL g, PCSZ name, PXNODE np);
|
||||
virtual PXATTR AddProperty(PGLOBAL g, char *name, PXATTR ap);
|
||||
virtual void AddText(PGLOBAL g, char *txtp);
|
||||
virtual void AddText(PGLOBAL g, PCSZ txtp);
|
||||
virtual void DeleteChild(PGLOBAL g, PXNODE dnp);
|
||||
|
||||
protected:
|
||||
@@ -373,7 +373,7 @@ LIBXMLDOC::LIBXMLDOC(char *nsl, char *nsdf, char *enc, PFBLOCK fp)
|
||||
/******************************************************************/
|
||||
/* Initialize XML parser and check library compatibility. */
|
||||
/******************************************************************/
|
||||
bool LIBXMLDOC::Initialize(PGLOBAL g, char *entry, bool zipped)
|
||||
bool LIBXMLDOC::Initialize(PGLOBAL g, PCSZ entry, bool zipped)
|
||||
{
|
||||
if (zipped && InitZip(g, entry))
|
||||
return true;
|
||||
@@ -434,7 +434,7 @@ PFBLOCK LIBXMLDOC::LinkXblock(PGLOBAL g, MODE m, int rc, char *fn)
|
||||
/******************************************************************/
|
||||
/* Construct and add the XML processing instruction node. */
|
||||
/******************************************************************/
|
||||
bool LIBXMLDOC::NewDoc(PGLOBAL g, char *ver)
|
||||
bool LIBXMLDOC::NewDoc(PGLOBAL g, PCSZ ver)
|
||||
{
|
||||
if (trace)
|
||||
htrc("NewDoc\n");
|
||||
@@ -863,14 +863,13 @@ RCODE XML2NODE::GetContent(PGLOBAL g, char *buf, int len)
|
||||
xmlFree(Content);
|
||||
|
||||
if ((Content = xmlNodeGetContent(Nodep))) {
|
||||
char *extra = " \t\r\n";
|
||||
char *p1 = (char*)Content, *p2 = buf;
|
||||
bool b = false;
|
||||
|
||||
// Copy content eliminating extra characters
|
||||
for (; *p1; p1++)
|
||||
if ((p2 - buf) < len) {
|
||||
if (strchr(extra, *p1)) {
|
||||
if (strchr(" \t\r\n", *p1)) {
|
||||
if (b) {
|
||||
// This to have one blank between sub-nodes
|
||||
*p2++ = ' ';
|
||||
@@ -1020,19 +1019,19 @@ PXATTR XML2NODE::GetAttribute(PGLOBAL g, char *name, PXATTR ap)
|
||||
/******************************************************************/
|
||||
/* Add a new child node to this node and return it. */
|
||||
/******************************************************************/
|
||||
PXNODE XML2NODE::AddChildNode(PGLOBAL g, char *name, PXNODE np)
|
||||
PXNODE XML2NODE::AddChildNode(PGLOBAL g, PCSZ name, PXNODE np)
|
||||
{
|
||||
char *p, *pn, *pf = NULL;
|
||||
char *p, *pn, *pf = NULL, *nmp = PlugDup(g, name);
|
||||
|
||||
if (trace)
|
||||
htrc("AddChildNode: %s\n", name);
|
||||
|
||||
// Is a prefix specified
|
||||
if ((pn = strchr(name, ':'))) {
|
||||
pf = name;
|
||||
if ((pn = strchr(nmp, ':'))) {
|
||||
pf = nmp;
|
||||
*pn++ = '\0'; // Separate name from prefix
|
||||
} else
|
||||
pn = name;
|
||||
pn = nmp;
|
||||
|
||||
// If name has the format m[n] only m is taken as node name
|
||||
if ((p = strchr(pn, '[')))
|
||||
@@ -1096,7 +1095,7 @@ PXATTR XML2NODE::AddProperty(PGLOBAL g, char *name, PXATTR ap)
|
||||
/******************************************************************/
|
||||
/* Add a new text node to this node. */
|
||||
/******************************************************************/
|
||||
void XML2NODE::AddText(PGLOBAL g, char *txtp)
|
||||
void XML2NODE::AddText(PGLOBAL g, PCSZ txtp)
|
||||
{
|
||||
if (trace)
|
||||
htrc("AddText: %s\n", txtp);
|
||||
|
Reference in New Issue
Block a user