[Pcre-svn] [998] code/trunk: Minor code fix to avoid static …

Top Page
Delete this message
Author: Subversion repository
Date:  
To: pcre-svn
Subject: [Pcre-svn] [998] code/trunk: Minor code fix to avoid static analyzer complaint.
Revision: 998
          http://www.exim.org/viewvc/pcre2?view=rev&revision=998
Author:   ph10
Date:     2018-09-06 16:59:11 +0100 (Thu, 06 Sep 2018)
Log Message:
-----------
Minor code fix to avoid static analyzer complaint.


Modified Paths:
--------------
    code/trunk/ChangeLog
    code/trunk/src/pcre2_jit_compile.c


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2018-09-04 17:01:28 UTC (rev 997)
+++ code/trunk/ChangeLog    2018-09-06 15:59:11 UTC (rev 998)
@@ -185,7 +185,11 @@
 quantifier is one or more. I can't see much use for a repeated anchored
 pattern, but the behaviour is now consistent.


+41. Minor addition to pcre2_jit_compile.c to avoid static analyzer complaint
+(for an event that could never occur but you had to have external information
+to know that).

+
Version 10.31 12-February-2018
------------------------------


Modified: code/trunk/src/pcre2_jit_compile.c
===================================================================
--- code/trunk/src/pcre2_jit_compile.c    2018-09-04 17:01:28 UTC (rev 997)
+++ code/trunk/src/pcre2_jit_compile.c    2018-09-06 15:59:11 UTC (rev 998)
@@ -7,7 +7,7 @@


                        Written by Philip Hazel
      Original API code Copyright (c) 1997-2012 University of Cambridge
-          New API code Copyright (c) 2016-2017 University of Cambridge
+          New API code Copyright (c) 2016-2018 University of Cambridge


 -----------------------------------------------------------------------------
 Redistribution and use in source and binary forms, with or without
@@ -5901,6 +5901,8 @@
     }
   }


+if (len == 0) return FALSE; /* Should never occur, but stops analyzers complaining. */
+
i = 0;
j = 0;