https://bugzilla.redhat.com/show_bug.cgi?id=1242980 Bug ID: 1242980 Summary: Compiler warnings in hv_func.h Product: Fedora Version: rawhide Component: perl Assignee: jplesnik@xxxxxxxxxx Reporter: jsafrane@xxxxxxxxxx QA Contact: extras-qa@xxxxxxxxxxxxxxxxx CC: cweyl@xxxxxxxxxxxxxxx, iarnell@xxxxxxxxx, jplesnik@xxxxxxxxxx, kasal@xxxxxx, perl-devel@xxxxxxxxxxxxxxxxxxxxxxx, ppisar@xxxxxxxxxx, psabata@xxxxxxxxxx, rc040203@xxxxxxxxxx, tcallawa@xxxxxxxxxx I get following warnings when compiling net-snmp with -Wall: gcc -c -I../../include -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -g -O2 -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib64/perl5/CORE -Wall -Wstrict-prototypes -Wwrite-strings -Wcast-qual -I. -I/usr/local/include -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DVERSION=\"5.08\" -DXS_VERSION=\"5.08\" -fPIC "-I/usr/lib64/perl5/CORE" default_store.c In file included from /usr/lib64/perl5/CORE/hv.h:629:0, from /usr/lib64/perl5/CORE/perl.h:3344, from default_store.xs:6: /usr/lib64/perl5/CORE/hv_func.h: In function ‘S_perl_hash_siphash_2_4’: /usr/lib64/perl5/CORE/hv_func.h:201:23: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] U64TYPE k0 = ((U64TYPE*)seed)[0]; ^ /usr/lib64/perl5/CORE/hv_func.h:202:23: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] U64TYPE k1 = ((U64TYPE*)seed)[1]; ^ In file included from /usr/lib64/perl5/CORE/hv.h:629:0, from /usr/lib64/perl5/CORE/perl.h:3344, from default_store.xs:6: /usr/lib64/perl5/CORE/hv_func.h: In function ‘S_perl_hash_superfast’: /usr/lib64/perl5/CORE/hv_func.h:260:18: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] U32 hash = *((U32*)seed) + len; ^ In file included from /usr/lib64/perl5/CORE/hv.h:629:0, from /usr/lib64/perl5/CORE/perl.h:3344, from default_store.xs:6: /usr/lib64/perl5/CORE/hv_func.h: In function ‘S_perl_hash_murmur3’: /usr/lib64/perl5/CORE/hv_func.h:364:16: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] U32 h1 = *((U32*)seed); ^ In file included from /usr/lib64/perl5/CORE/hv.h:629:0, from /usr/lib64/perl5/CORE/perl.h:3344, from default_store.xs:6: /usr/lib64/perl5/CORE/hv_func.h:401:21: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] k1 = U8TO32_LE(ptr); ^ /usr/lib64/perl5/CORE/hv_func.h:408:24: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] carry = U8TO32_LE(ptr); ^ /usr/lib64/perl5/CORE/hv_func.h:416:24: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] carry = U8TO32_LE(ptr); ^ /usr/lib64/perl5/CORE/hv_func.h:424:24: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] carry = U8TO32_LE(ptr); ^ /usr/lib64/perl5/CORE/hv_func.h: In function ‘S_perl_hash_djb2’: /usr/lib64/perl5/CORE/hv_func.h:458:18: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] U32 hash = *((U32*)seed + len); ^ /usr/lib64/perl5/CORE/hv_func.h: In function ‘S_perl_hash_sdbm’: /usr/lib64/perl5/CORE/hv_func.h:468:18: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] U32 hash = *((U32*)seed + len); ^ In file included from /usr/lib64/perl5/CORE/hv.h:629:0, from /usr/lib64/perl5/CORE/perl.h:3344, from default_store.xs:6: /usr/lib64/perl5/CORE/hv_func.h: In function ‘S_perl_hash_one_at_a_time’: /usr/lib64/perl5/CORE/hv_func.h:494:18: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] U32 hash = *((U32*)seed) + len; ^ /usr/lib64/perl5/CORE/hv_func.h: In function ‘S_perl_hash_one_at_a_time_hard’: /usr/lib64/perl5/CORE/hv_func.h:509:18: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] U32 hash = *((U32*)seed) + len; ^ /usr/lib64/perl5/CORE/hv_func.h: In function ‘S_perl_hash_old_one_at_a_time’: /usr/lib64/perl5/CORE/hv_func.h:544:18: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] U32 hash = *((U32*)seed); ^ This pollutes build logs and we may miss some useful warning. What about this? - U32 hash = *((U32*)seed) + len; + U32 hash = (U32) *seed + len; -- You are receiving this mail because: You are on the CC list for the bug. -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel