develooper Front page | perl.perl5.porters | Postings from November 2016

Re: [perl #130169] Fix const correctness for header files

Thread Previous | Thread Next
From:
Zefram
Date:
November 24, 2016 21:05
Subject:
Re: [perl #130169] Fix const correctness for header files
Message ID:
20161124210528.GN6488@fysh.org
Petr Pisar wrote:
>                                                   I cannot see a way how to
>get rid of the warnings there without changing prototype. I looked into glibc
>sources how char *strchr(const char *, int) is solved. It isn't. It also
>produces many warnings. Here I doubt about helpfullness of the -Wcast-qual
>warnings.

Indeed.  We're not going to want to change prototypes here, for the same
reasons that the strchr() prototype is appropriate as it is.  The code
is correct, and there's no reasonable way to avoid these warnings.

Your first two patches seem OK.  We're happy with that kind of localised
change to avoid warnings.

-zefram

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About