Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: a5ccef6909119edd41a0d1318d88f461e28f6623
      
https://github.com/Perl/perl5/commit/a5ccef6909119edd41a0d1318d88f461e28f6623
  Author: Lukas Mai <lukasmai....@gmail.com>
  Date:   2025-03-18 (Tue, 18 Mar 2025)

  Changed paths:
    M dump.c
    M malloc.c
    M os2/perlrexx.c
    M pod/perldiag.pod
    M t/porting/diag.t

  Log Message:
  -----------
  eliminate more trivial format strings ("%s", "...")

As a follow-up to commit 71d1d453e7, turn more trivial format strings
(i.e. "%s" followed by a string literal) into just that string literal.

- dump.c: String literals are more efficiently appended using sv_catpvs;
  C strings using sv_patv. No need to invoke the entire sv_catpvf
  machinery to parse a static "format string" of length 1.
- malloc.c: Disentangle some warning messages and make them properly
  match their (previously orphaned) perldiag entries again.
- os2/perlrexx.c: Turn sprintf(x, "...") into strcpy(x, "...").


  Commit: 648bc881bcb6a326c397b1449cc460b160721282
      
https://github.com/Perl/perl5/commit/648bc881bcb6a326c397b1449cc460b160721282
  Author: Lukas Mai <lukasmai....@gmail.com>
  Date:   2025-03-18 (Tue, 18 Mar 2025)

  Changed paths:
    M malloc.c

  Log Message:
  -----------
  malloc.c: silence "unused result" compiler warning

Before:

    malloc.c: In function ‘getpages’:
    malloc.c:273:34: warning: ignoring return value of ‘write’ declared with 
attribute ‘warn_unused_result’ [-Wunused-result]
      273 | #    define fatalcroak(mess)    (write(2, (mess), strlen(mess)), 
exit(2))
          |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    malloc.c:1546:21: note: in expansion of macro ‘fatalcroak’
     1546 |                     fatalcroak("panic: Off-page sbrk\n");
          |                     ^~~~~~~~~~
    malloc.c:273:34: warning: ignoring return value of ‘write’ declared with 
attribute ‘warn_unused_result’ [-Wunused-result]
      273 | #    define fatalcroak(mess)    (write(2, (mess), strlen(mess)), 
exit(2))
          |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    malloc.c:1585:13: note: in expansion of macro ‘fatalcroak’
     1585 |             fatalcroak("Misalignment of sbrk()\n");
          |             ^~~~~~~~~~
    gcc -c -DPERL_CORE -fwrapv -fno-strict-aliasing -pipe 
-fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -std=c99 -O2 -Wall -Werror=pointer-arith -Werror=vla 
-Wextra -Wno-long-long -Wno-declaration-after-statement -Wc++-compat 
-Wwrite-strings -Wno-use-after-free universal.c

(The "make depend" comment was overlooked in commit b9e5552c5b.)


Compare: https://github.com/Perl/perl5/compare/79ae12aeb4e6...648bc881bcb6

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

Reply via email to