[pcre-dev] [Bug 2087] New: Questionable assignment for “firs…

Góra strony
Delete this message
Autor: admin
Data:  
Dla: pcre-dev
Nowe tematy: [pcre-dev] [Bug 2087] Questionable assignment for“firstcu” in compile_branch(), [pcre-dev] [Bug 2087] Questionable assignment for“firstcu” in compile_branch(), [pcre-dev] [Bug 2087] Questionable assignment for“firstcu” in compile_branch(), [pcre-dev] [Bug 2087] Questionable assignment for“firstcu” in compile_branch()
Temat: [pcre-dev] [Bug 2087] New: Questionable assignment for “firstcu” in compile_branch()
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: ph10@???
          Reporter: elfring@???
                CC: pcre-dev@???


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.