8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 06:43:04 +01:00

Fixed PSV-Studio warnings

This commit is contained in:
hvlad 2017-11-29 20:18:10 +02:00
parent a782c53249
commit 4ab70f384b
3 changed files with 5 additions and 4 deletions

View File

@ -3384,7 +3384,8 @@ void ExecStatementNode::genBlr(DsqlCompilerScratch* dsqlScratch)
}
// If no new features of EXECUTE STATEMENT are used, lets generate old BLR.
if (!dataSource && !userName && !password && !role && !useCallerPrivs && !inputs && !traScope)
if (!dataSource && !userName && !password && !role && !useCallerPrivs && !inputs &&
traScope == EDS::traNotSet)
{
if (outputs)
{
@ -3445,7 +3446,7 @@ void ExecStatementNode::genBlr(DsqlCompilerScratch* dsqlScratch)
genOptionalExpr(dsqlScratch, blr_exec_stmt_role, role);
// dsqlScratch's transaction behavior.
if (traScope)
if (traScope != EDS::traNotSet)
{
// Transaction parameters equal to current transaction.
dsqlScratch->appendUChar(blr_exec_stmt_tran_clone);

View File

@ -686,7 +686,7 @@ public:
inputs(NULL),
outputs(NULL),
useCallerPrivs(false),
traScope(EDS::TraScope(0)), // not defined
traScope(EDS::traNotSet), // not defined
inputNames(NULL)
{
}

View File

@ -47,7 +47,7 @@ class Statement;
class Blob;
enum TraModes {traReadCommited, traReadCommitedRecVersions, traConcurrency, traConsistency};
enum TraScope {traAutonomous = 1, traCommon, traTwoPhase};
enum TraScope {traNotSet = 0, traAutonomous = 1, traCommon, traTwoPhase};
// Known built-in provider's names
extern const char* FIREBIRD_PROVIDER_NAME;