diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2015-05-10 12:14:21 +0200 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2015-05-10 12:14:21 +0200 |
commit | c63bd866fd4ec4d129bd165d4da8d8d004ab3dbd (patch) | |
tree | ef3f0f1554483af51fc108b70f14587732bf3388 /storage/connect/tabxml.cpp | |
parent | f5d0c7706214922e786369265bd1545c0341924d (diff) | |
download | mariadb-git-c63bd866fd4ec4d129bd165d4da8d8d004ab3dbd.tar.gz |
Get rid of more GCC warnings about unused parameters
modified: storage/connect/array.cpp
modified: storage/connect/ha_connect.cc
modified: storage/connect/mycat.cc
modified: storage/connect/tabxml.cpp
modified: storage/connect/user_connect.cc
modified: storage/connect/user_connect.h
Diffstat (limited to 'storage/connect/tabxml.cpp')
-rw-r--r-- | storage/connect/tabxml.cpp | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/storage/connect/tabxml.cpp b/storage/connect/tabxml.cpp index c25c3d9ffb4..46f762efc35 100644 --- a/storage/connect/tabxml.cpp +++ b/storage/connect/tabxml.cpp @@ -118,7 +118,7 @@ PQRYRES XMLColumns(PGLOBAL g, char *dp, char *tab, PTOS topt, bool info) FLD_LENGTH, FLD_SCALE, FLD_NULL, FLD_FORMAT}; static unsigned int length[] = {0, 6, 8, 10, 10, 6, 6, 0}; char *op, colname[65], fmt[129], buf[512]; - int i, j, lvl, rc, n = 0; + int i, j, lvl, n = 0; int ncol = sizeof(buftyp) / sizeof(int); bool ok = true; PXCL xcol, xcp, fxcp = NULL, pxcp = NULL; @@ -164,7 +164,7 @@ PQRYRES XMLColumns(PGLOBAL g, char *dp, char *tab, PTOS topt, bool info) txmp = new(g) TDBXML(tdp); if (txmp->Initialize(g)) - return NULL; + goto err; xcol = new(g) XMCOL; colname[64] = 0; @@ -224,8 +224,16 @@ PQRYRES XMLColumns(PGLOBAL g, char *dp, char *tab, PTOS topt, bool info) if (vp->atp) { strncpy(colname, vp->atp->GetName(g), sizeof(colname)); strncat(xcol->Name, colname, 64); - rc = vp->atp->GetText(g, buf, sizeof(buf)); - strncat(fmt, "@", sizeof(fmt)); + + switch (vp->atp->GetText(g, buf, sizeof(buf))) { + case RC_INFO: + PushWarning(g, txmp); + case RC_OK: + strncat(fmt, "@", sizeof(fmt)); + break; + default: + goto err; + } // enswitch rc if (j) strncat(fmt, colname, sizeof(fmt)); @@ -273,7 +281,15 @@ PQRYRES XMLColumns(PGLOBAL g, char *dp, char *tab, PTOS topt, bool info) } else ok = true; - rc = node->GetContent(g, buf, sizeof(buf)); + switch (node->GetContent(g, buf, sizeof(buf))) { + case RC_INFO: + PushWarning(g, txmp); + case RC_OK: + break; + default: + goto err; + } // enswitch rc + } // endif atp; xcol->Len = strlen(buf); |