This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix const correctness in hv_func.h
authorPetr Písař <ppisar@redhat.com>
Thu, 24 Nov 2016 15:34:09 +0000 (16:34 +0100)
committerTony Cook <tony@develop-help.com>
Wed, 30 Nov 2016 23:12:54 +0000 (10:12 +1100)
commit463ddf34c08f2c97199b1bb242da1f17494d4d1a
treeab0921e2bca860475202dfd86396bdf697a9f724
parent71ca73e5fa9639ac33e9f2e74cd0c32288a5040d
Fix const correctness in hv_func.h

Building an XS code with -Wcast-qual yielded warnings about discarding
const qualifiers from pointer targets like:

$ printf '#include "EXTERN.h"\n#include "perl.h"\n' | gcc -Wcast-qual -I/usr/lib64/perl5/CORE -c -x c -
In file included from /usr/lib64/perl5/CORE/hv.h:629:0,
                 from /usr/lib64/perl5/CORE/perl.h:3740,
                 from <stdin>:2:
/usr/lib64/perl5/CORE/hv_func.h: In function ‘S_perl_hash_siphash_2_4’:
/usr/lib64/perl5/CORE/hv_func.h:213:17: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual]
   U64TYPE k0 = ((U64TYPE*)seed)[0];
                 ^

Signed-off-by: Petr Písař <ppisar@redhat.com>
hv_func.h