https://bugs.exim.org/show_bug.cgi?id=2087

            Bug ID: 2087
           Summary: Questionable assignment for “firstcu” in
                    compile_branch()
           Product: PCRE
           Version: 10.23 (PCRE2)
          Hardware: All
                OS: All
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Code
          Assignee: p...@hermes.cam.ac.uk
          Reporter: elfr...@users.sourceforge.net
                CC: pcre-dev@exim.org

The analysis tool “Cppcheck 1.77-10.d_t.2” pointed an implementation detail
out:

Variable 'firstcu' is reassigned a value before the old one has been used.


Would you like to reconsider the following source code in the function
“compile_branch”?
https://vcs.pcre.org/pcre2/code/trunk/src/pcre2_compile.c?revision=681&view=markup
https://github.com/svn2github/pcre2/blob/a74ea02e5006bae4484b508b04a010e90c4dfdc2/src/pcre2_compile.c#L7184

…
      if (mclength == 1 || req_caseopt == 0)
        {
        firstcu = mcbuffer[0] | req_caseopt;
        firstcu = mcbuffer[0];
        firstcuflags = req_caseopt;
…

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
## List details at https://lists.exim.org/mailman/listinfo/pcre-dev 

Reply via email to