From 3c57624ef484506ca6dceaa4eecad8bc00c9eb5c Mon Sep 17 00:00:00 2001 From: Vincent Rogier Date: Wed, 8 Feb 2017 22:23:08 +0100 Subject: [PATCH] Fix coverity static code analysis warning --- src/statement.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/statement.c b/src/statement.c index 1f946b45..886c39a8 100644 --- a/src/statement.c +++ b/src/statement.c @@ -635,7 +635,10 @@ boolean OCI_BindData /* set allocation mode prior any required data allocation */ - bnd->alloc_mode = (ub1) stmt->bind_alloc_mode; + if (OCI_STATUS) + { + bnd->alloc_mode = (ub1)stmt->bind_alloc_mode; + } /* for handle based data types, we need to allocate an array of handles for bind calls because OCILIB uses external arrays of OCILIB Objects */