Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 5b2c91c3c57e411ffed2b23039f769f30abb4d9f
      
https://github.com/Perl/perl5/commit/5b2c91c3c57e411ffed2b23039f769f30abb4d9f
  Author: Tony Cook <t...@develop-help.com>
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
    M regcomp_study.c

  Log Message:
  -----------
  regcomp_study.c: merged value only used under -DDEBUGGING

For a non-debugging build this would warn with clang 17:

regcomp_study.c:1067:9: warning: variable 'merged' set but not used 
[-Wunused-but-set-variable]
 1067 |     U32 merged = 0;
      |         ^


  Commit: 122500c227656f4f9334ca280614d721dcabacba
      
https://github.com/Perl/perl5/commit/122500c227656f4f9334ca280614d721dcabacba
  Author: Tony Cook <t...@develop-help.com>
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
    M regcomp_trie.c

  Log Message:
  -----------
  regcomp_trie: prevent wordlen value not used warning

This occurs with clang-17, and possibly other versions:

regcomp_trie.c:667:13: warning: variable 'wordlen' set but not used 
[-Wunused-but-set-variable]
  667 |         U32 wordlen      = 0;         /* required init */
      |             ^

This happens because while the first loop in Perl_make_trie calculates
wordlen, mostly via the TRIE_READ_CHAR macro, that calculated value
isn't used.

The later loops do use the value of wordlen via the TRIE_HANDLE_WORD()
macro.

Unfortunately the use in TRIE_READ_CHAR() means we can't remove
this first definition, so suppress the warning.


Compare: https://github.com/Perl/perl5/compare/c37e28edf736...122500c22765

To unsubscribe from these emails, change your notification settings at 
https://github.com/Perl/perl5/settings/notifications

Reply via email to