Commit 04b1e61d authored by Sergei Golubchik's avatar Sergei Golubchik

compiler warning

storage/connect/tabjson.cpp:198:10: warning: converting to non-pointer type ‘int’ from NULL [-Wconversion-null]
   return NULL;
parent 1cb7c4bf
...@@ -195,7 +195,7 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt) ...@@ -195,7 +195,7 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt)
tdp->Fn = GetStringTableOption(g, topt, "Filename", NULL); tdp->Fn = GetStringTableOption(g, topt, "Filename", NULL);
if (!(tdp->Database = SetPath(g, db))) if (!(tdp->Database = SetPath(g, db)))
return NULL; return 0;
tdp->Objname = GetStringTableOption(g, topt, "Object", NULL); tdp->Objname = GetStringTableOption(g, topt, "Object", NULL);
tdp->Base = GetIntegerTableOption(g, topt, "Base", 0) ? 1 : 0; tdp->Base = GetIntegerTableOption(g, topt, "Base", 0) ? 1 : 0;
...@@ -243,14 +243,14 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt) ...@@ -243,14 +243,14 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt)
tjsp = new(g) TDBJSON(tdp, new(g) MAPFAM(tdp)); tjsp = new(g) TDBJSON(tdp, new(g) MAPFAM(tdp));
if (tjsp->MakeDocument(g)) if (tjsp->MakeDocument(g))
return NULL; return 0;
jsp = (tjsp->GetDoc()) ? tjsp->GetDoc()->GetValue(0) : NULL; jsp = (tjsp->GetDoc()) ? tjsp->GetDoc()->GetValue(0) : NULL;
} else { } else {
if (!(tdp->Lrecl = GetIntegerTableOption(g, topt, "Lrecl", 0))) if (!(tdp->Lrecl = GetIntegerTableOption(g, topt, "Lrecl", 0)))
if (!mgo) { if (!mgo) {
sprintf(g->Message, "LRECL must be specified for pretty=%d", tdp->Pretty); sprintf(g->Message, "LRECL must be specified for pretty=%d", tdp->Pretty);
return NULL; return 0;
} else } else
tdp->Lrecl = 8192; // Should be enough tdp->Lrecl = 8192; // Should be enough
...@@ -269,14 +269,14 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt) ...@@ -269,14 +269,14 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt)
tjnp = new(g) TDBJSN(tdp, new(g) CMGFAM(tdp)); tjnp = new(g) TDBJSN(tdp, new(g) CMGFAM(tdp));
#else #else
sprintf(g->Message, "Mongo %s Driver not available", "C"); sprintf(g->Message, "Mongo %s Driver not available", "C");
return NULL; return 0;
#endif #endif
} else if (tdp->Driver && toupper(*tdp->Driver) == 'J') { } else if (tdp->Driver && toupper(*tdp->Driver) == 'J') {
#if defined(JAVA_SUPPORT) #if defined(JAVA_SUPPORT)
tjnp = new(g) TDBJSN(tdp, new(g) JMGFAM(tdp)); tjnp = new(g) TDBJSN(tdp, new(g) JMGFAM(tdp));
#else #else
sprintf(g->Message, "Mongo %s Driver not available", "Java"); sprintf(g->Message, "Mongo %s Driver not available", "Java");
return NULL; return 0;
#endif #endif
} else { // Driver not specified } else { // Driver not specified
#if defined(CMGO_SUPPORT) #if defined(CMGO_SUPPORT)
...@@ -285,7 +285,7 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt) ...@@ -285,7 +285,7 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt)
tjnp = new(g) TDBJSN(tdp, new(g) JMGFAM(tdp)); tjnp = new(g) TDBJSN(tdp, new(g) JMGFAM(tdp));
#else #else
sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "MONGO"); sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "MONGO");
return NULL; return 0;
#endif #endif
} // endif Driver } // endif Driver
...@@ -304,7 +304,7 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt) ...@@ -304,7 +304,7 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt)
tjnp->SetG(G); tjnp->SetG(G);
if (tjnp->OpenDB(g)) if (tjnp->OpenDB(g))
return NULL; return 0;
switch (tjnp->ReadDB(g)) { switch (tjnp->ReadDB(g)) {
case RC_EF: case RC_EF:
......
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