Skip Menu |

This queue is for tickets about the POSIX-2008 CPAN distribution.

Report information
The Basics
Id: 127902
Status: new
Priority: 0/
Queue: POSIX-2008

People
Owner: Nobody in particular
Requestors: ppisar [...] redhat.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.16
Fixed in: (no value)



Subject: Format string warning on 32-bit ARM: 2008.xs:1658:16: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'off_t' {aka 'long long int'}
When building for 32-bit ARM with GCC 8.2.1, I received these two warnings: armv7hl-redhat-linux-gnueabi-gcc -c -I. -D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=armv7-a -mfpu=vfpv3-d16 -mtune=generic-armv7-a -mabi=aapcs-linux -mfloat-abi=hard -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=armv7-a -mfpu=vfpv3-d16 -mtune=generic-armv7-a -mabi=aapcs-linux -mfloat-abi=hard -DVERSION=\"0.16\" -DXS_VERSION=\"0.16\" -fPIC "-I/usr/lib/perl5/CORE" 2008.c 2008.xs: In function 'XS_POSIX__2008_pread': 2008.xs:1658:16: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'off_t' {aka 'long long int'} [-Wformat=] warn("Offset %ld outside string", buf_offset); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~ 2008.xs: In function 'XS_POSIX__2008_pwrite': 2008.xs:1709:14: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'off_t' {aka 'long long int'} [-Wformat=] warn("Offset %ld outside string", buf_offset); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~ It seems off_t is long long int on this platform. Please change the format string to %lld.