diff options
author | Monty <monty@mariadb.org> | 2020-01-29 16:41:04 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2020-01-29 23:23:55 +0200 |
commit | 4d61f1247a1b6a86570cb03d3450930a78d689b3 (patch) | |
tree | e7b98495425ae73591c8c1f3cf81793196aca3ea /storage/connect/tabjson.cpp | |
parent | cd2c0e013ccb5f9b009743dfd7188585a539d9b5 (diff) | |
download | mariadb-git-4d61f1247a1b6a86570cb03d3450930a78d689b3.tar.gz |
Fixed compiler warnings from gcc 7.4.1
- Fixed possible error in rocksdb/rdb_datadic.cc
Diffstat (limited to 'storage/connect/tabjson.cpp')
-rw-r--r-- | storage/connect/tabjson.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/storage/connect/tabjson.cpp b/storage/connect/tabjson.cpp index 7e8d6c8d9f0..a8e96e2fe8d 100644 --- a/storage/connect/tabjson.cpp +++ b/storage/connect/tabjson.cpp @@ -255,11 +255,13 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt) jsp = (tjsp->GetDoc()) ? tjsp->GetDoc()->GetValue(0) : NULL; } else { if (!(tdp->Lrecl = GetIntegerTableOption(g, topt, "Lrecl", 0))) + { if (!mgo) { sprintf(g->Message, "LRECL must be specified for pretty=%d", tdp->Pretty); return 0; } else tdp->Lrecl = 8192; // Should be enough + } tdp->Ending = GetIntegerTableOption(g, topt, "Ending", CRLF); @@ -1328,7 +1330,7 @@ bool JSONCOL::ParseJpath(PGLOBAL g) { char *p, *p1 = NULL, *p2 = NULL, *pbuf = NULL; int i; - bool a, mul = false; + bool a; if (Parsed) return false; // Already done @@ -1427,6 +1429,7 @@ PSZ JSONCOL::GetJpath(PGLOBAL g, bool proj) return NULL; for (p1 = p2 = mgopath; *p1; p1++) + { if (i) { // Inside [] if (isdigit(*p1)) { if (!proj) @@ -1464,12 +1467,12 @@ PSZ JSONCOL::GetJpath(PGLOBAL g, bool proj) p2--; // Suppress last :* break; } // endif p2 - + /* falls through */ default: *p2++ = *p1; break; } // endswitch p1; - + } *p2 = 0; return mgopath; } else @@ -1558,7 +1561,6 @@ void JSONCOL::ReadColumn(PGLOBAL g) PVAL JSONCOL::GetColumnValue(PGLOBAL g, PJSON row, int i) { int n = Nod - 1; - bool expd = false; PJAR arp; PJVAL val = NULL; @@ -2119,13 +2121,14 @@ int TDBJSON::Cardinality(PGLOBAL g) if (!g) return (Xcol || Multiple) ? 0 : 1; else if (Cardinal < 0) + { if (!Multiple) { if (MakeDocument(g) == RC_OK) Cardinal = Doc->size(); } else return 10; - + } return Cardinal; } // end of Cardinality |