Skip to content

mbstring compile warning due to non-strings #20492

Closed

Description

@VARGA-Peter

Description

Below the warning for all occurrences of the iso codes.

/builds/php-8.4.14/ext/mbstring/libmbfl/filters/mbfilter_utf8.c:728:38: warning: initializer-string for array of ‘char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (3 chars into 2 available) [-Wunterminated-string-initialization]
  728 | static const char nflags_s[10][2] = {"CN","DE","ES","FR","GB","IT","JP","KR","RU","US"};

PHP Version

8.4.14

Operating System

SLES 15 SP7

Activity

  1. changed the title [-]gcc 15 warning 8.4.14[/-] [+]gcc-15 warning 8.4.14[/+] on Nov 15, 2025
  2. ndossche commented on Nov 15, 2025

    @ndossche
    Member

    This is fixed on master with the ZEND_NONSTRING attribute, but because the attribute is in a public header this addition wasn't backported.
    It's possible to backport a local fix for this issue though.

  3. self-assigned this
    on Nov 15, 2025
  4. changed the title [-]gcc-15 warning 8.4.14[/-] [+]mbstring compile warning due to non-strings[/+] on Nov 15, 2025
  5. added a commit that references this issue on Nov 15, 2025
    58a60d5
  6. added 4 commits that reference this issue on Nov 20, 2025
    10ac41f
    929e717
    c0cf841
    159ef14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions