In perl.git, the branch blead has been updated <https://perl5.git.perl.org/perl.git/commitdiff/e099ea69849a3f8a0139b1ff7e4a06c029d8d91e?hp=9961787152c9adc1b9a2c8b521c7eddc817f7da7>
- Log ----------------------------------------------------------------- commit e099ea69849a3f8a0139b1ff7e4a06c029d8d91e Author: Karl Williamson <[email protected]> Date: Thu Apr 5 12:19:09 2018 -0600 Fixes found by coverity I didn't get any feedback as to if this fixed the issues found by coverity, but smoke tests didn't find any problem with it, and I believe it does addess these issues, so with the freeze date upon us, I'm committing it. ----------------------------------------------------------------------- Summary of changes: inline.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/inline.h b/inline.h index dc74c2daed..d847c6b4ad 100644 --- a/inline.h +++ b/inline.h @@ -387,7 +387,7 @@ S_is_utf8_invariant_string_loc(const U8* const s, STRLEN len, const U8 ** ep) /* This looks like 0x808080... */ # define PERL_VARIANTS_WORD_MASK (PERL_COUNT_MULTIPLIER * 0x80) -# define PERL_WORDSIZE sizeof(PERL_COUNT_MULTIPLIER) +# define PERL_WORDSIZE sizeof(PERL_UINTMAX_T) # define PERL_WORD_BOUNDARY_MASK (PERL_WORDSIZE - 1) /* Evaluates to 0 if 'x' is at a word boundary; otherwise evaluates to 1, by @@ -1293,9 +1293,9 @@ Perl_utf8_hop(const U8 *s, SSize_t off) s--; } } - GCC_DIAG_IGNORE_STMT(-Wcast-qual); + GCC_DIAG_IGNORE(-Wcast-qual) return (U8 *)s; - GCC_DIAG_RESTORE_STMT; + GCC_DIAG_RESTORE } /* @@ -1330,16 +1330,16 @@ Perl_utf8_hop_forward(const U8 *s, SSize_t off, const U8 *end) while (off--) { STRLEN skip = UTF8SKIP(s); if ((STRLEN)(end - s) <= skip) { - GCC_DIAG_IGNORE_STMT(-Wcast-qual); + GCC_DIAG_IGNORE(-Wcast-qual) return (U8 *)end; - GCC_DIAG_RESTORE_STMT; + GCC_DIAG_RESTORE } s += skip; } - GCC_DIAG_IGNORE_STMT(-Wcast-qual); + GCC_DIAG_IGNORE(-Wcast-qual) return (U8 *)s; - GCC_DIAG_RESTORE_STMT; + GCC_DIAG_RESTORE } /* @@ -1377,9 +1377,9 @@ Perl_utf8_hop_back(const U8 *s, SSize_t off, const U8 *start) s--; } - GCC_DIAG_IGNORE_STMT(-Wcast-qual); + GCC_DIAG_IGNORE(-Wcast-qual) return (U8 *)s; - GCC_DIAG_RESTORE_STMT; + GCC_DIAG_RESTORE } /* -- Perl5 Master Repository
