Fix use of uninitialized variables
Building with optimization in debug mode revealed code that could in theory result in undefined behavior.
This commit is contained in:
@ -123,7 +123,7 @@ int test(StorageFactory& factory, istream& in)
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int rv = EXIT_FAILURE;
|
||||
StorageFactory* pFactory;
|
||||
StorageFactory* pFactory = nullptr;
|
||||
if ((argc == 2) || (argc == 3))
|
||||
{
|
||||
char* libdir = MXS_STRDUP("../../../../../query_classifier/qc_sqlite/");
|
||||
|
||||
@ -131,7 +131,9 @@ HINT* hint_parser(HINT_SESSION* session, GWBUF* request)
|
||||
int len, residual, state;
|
||||
int found, escape, quoted, squoted;
|
||||
HINT* rval = NULL;
|
||||
char* pname, * lvalue, * hintname = NULL;
|
||||
char* pname = nullptr;
|
||||
char* lvalue = nullptr;
|
||||
char* hintname = nullptr;
|
||||
GWBUF* buf;
|
||||
HINT_TOKEN* tok;
|
||||
HINT_MODE mode = HM_EXECUTE;
|
||||
|
||||
@ -740,7 +740,7 @@ static void destroyInstance(MXS_FILTER* instance)
|
||||
|
||||
static void checkNamedPipe(TPM_INSTANCE* inst)
|
||||
{
|
||||
int ret;
|
||||
int ret = 0;
|
||||
char buffer[2];
|
||||
char buf[4096];
|
||||
char* named_pipe = inst->named_pipe;
|
||||
|
||||
Reference in New Issue
Block a user