On Thu, Nov 24, 2016 at 01:05:58PM -0800, Zefram via RT wrote: > 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. > I searched Perl sources to see how utf8_hop is used and it's realy mix of all the ways. Should I bother with compiler pragmata to silent the warning? GCC-specific code would be: char *foo(const char *a) { #if defined __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wcast-qual" #endif return (char *)a; #if defined __GNUC__ #pragma GCC diagnostic pop #endif } I do not want to clutter the sources. > Your first two patches seem OK. We're happy with that kind of localised > change to avoid warnings. > Thanks for reviewing the patches. -- PetrThread Previous | Thread Next