Skip to content

string/strspn/strrcspn.h: assignment discards 'const' qualifier from pointer target type #1218

Open
@zeha

Description

@zeha
libtool: compile:  gcc -I. -I.. -I.. -isystem /usr/include/aarch64-linux-gnu/bsd -DLIBBSD_OVERLAY -lsystemd -O2 -Wall -Wextra -Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Wno-expansi
on-to-defined -Wno-unknown-attributes -Wno-unknown-warning-option -MT libshadow_la-getdef.lo -MD -MP -MF .deps/libshadow_la-getdef.Tpo -c getdef.c  -fPIC -DPIC -o .libs/libshadow_la-getdef.o
In file included from string/strspn/stprspn.h:13,
                 from getdef.c:36:
./string/strspn/strrspn.h: In function 'strrspn_':
./string/strspn/strrspn.h:29:11: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
   29 |         p = strnul(s);
      |           ^

seen on current master 77eb67d

/cc @alejandro-colomar

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions