[pcre-dev] [Bug 1849] clang 3.8 warnings from pcre2test.c

Kezdőlap
Üzenet törlése
Szerző: admin
Dátum:  
Címzett: pcre-dev
Tárgy: [pcre-dev] [Bug 1849] clang 3.8 warnings from pcre2test.c
https://bugs.exim.org/show_bug.cgi?id=1849

jhi@??? changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|medium                      |low


--- Comment #1 from jhi@??? ---
Using clang 3.8.0 -Wall:

....
  CC     src/pcre2test-pcre2test.o
src/pcre2test.c:3694:5: warning: variable 'cblock_size' is used uninitialized
whenever 'if' condition is false [-Wsometimes-uninitialized]
if (test_mode == 8) cblock_size = sizeof(pcre2_real_code_8);
    ^~~~~~~~~~~~~~
src/pcre2test.c:3707:60: note: uninitialized use occurs here
  (int)(size - name_count*name_entry_size*code_unit_size - cblock_size));
                                                           ^~~~~~~~~~~
src/pcre2test.c:3694:1: note: remove the 'if' if its condition is always true
if (test_mode == 8) cblock_size = sizeof(pcre2_real_code_8);
^~~~~~~~~~~~~~~~~~~~
src/pcre2test.c:3691:25: note: initialize the variable 'cblock_size' to silence
this warning
size_t size, cblock_size;
                        ^
                         = 0
src/pcre2test.c:4721:5: warning: variable 'errorcode' is used uninitialized
whenever 'if' condition is false [-Wsometimes-uninitialized]
if (test_mode == PCRE8_MODE) errorcode = 0;
    ^~~~~~~~~~~~~~~~~~~~~~~
src/pcre2test.c:4732:8: note: uninitialized use occurs here
switch(errorcode)
       ^~~~~~~~~
src/pcre2test.c:4721:1: note: remove the 'if' if its condition is always true
if (test_mode == PCRE8_MODE) errorcode = 0;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pcre2test.c:4386:14: note: initialize the variable 'errorcode' to silence
this warning
int errorcode;
             ^
              = 0
2 warnings generated.
  CCLD   pcre2test


--
You are receiving this mail because:
You are on the CC list for the bug.