summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-01-30 11:57:11 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-01-30 21:31:25 +0100
commitd7f5e7e04adf607a5f82185777a2167bfde20fff (patch)
tree1d6643616209b410f46a3ec70b73f8cbd1e93037 /connectivity
parent5e787f43dc93be087a67f72dcea1fd0ae0fff9a4 (diff)
coverity#1421119 Dereference after null check
Change-Id: Ic5002a25ed51fe72e1f36f365707101632d786e1 Reviewed-on: https://gerrit.libreoffice.org/48905 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/parse/sqlflex.l16
1 files changed, 11 insertions, 5 deletions
diff --git a/connectivity/source/parse/sqlflex.l b/connectivity/source/parse/sqlflex.l
index 5d8a59c27844..9bbf3d173b67 100644
--- a/connectivity/source/parse/sqlflex.l
+++ b/connectivity/source/parse/sqlflex.l
@@ -84,11 +84,17 @@ OSQLScanner* xxx_pGLOBAL_SQLSCAN = nullptr;
result = (c == EOF) ? YY_NULL : (buf[0] = c, 1);\
}
-#define YY_FATAL_ERROR(msg) \
-{ \
- xxx_pGLOBAL_SQLSCAN->SQLyyerror(msg); \
- /*hack to silence -Wunused-function*/ \
- if (0) yy_fatal_error(msg); \
+// coverity[+kill]
+static void do_fatal_error(const char* msg)
+{
+ xxx_pGLOBAL_SQLSCAN->SQLyyerror(msg);
+ /*hack to silence -Wunused-function*/
+ if (0) yy_fatal_error(msg);
+}
+
+#define YY_FATAL_ERROR(msg) \
+{ \
+ do_fatal_error(msg); \
}
%}