connectivity/source/parse/sqlflex.l | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
New commits: commit d7f5e7e04adf607a5f82185777a2167bfde20fff Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jan 30 11:57:11 2018 +0000 coverity#1421119 Dereference after null check Change-Id: Ic5002a25ed51fe72e1f36f365707101632d786e1 Reviewed-on: https://gerrit.libreoffice.org/48905 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> 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); \ } %} _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits