Skip Menu |

This queue is for tickets about the Sort-Key CPAN distribution.

Report information
The Basics
Id: 131704
Status: new
Priority: 0/
Queue: Sort-Key

People
Owner: Nobody in particular
Requestors: IKEGAMI [...] cpan.org
Cc:
AdminCc:

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



Subject: Wrong format specifiers used for croak
When installing Sort::Key on Ubuntu on Windows Subsystem for Linux (WSL), I get the following warnings: Key.xs: In function ‘_keysort’: Key.xs:237:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘IV {aka long int}’ [-Wformat=] croak("unsupported sort type %d", type); ^~~~~~~~~~~~~~~~~~~~~~~~~~ Key.xs: In function ‘_multikeysort’: Key.xs:547:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘STRLEN {aka long unsigned int}’ [-Wformat=] croak("wrong number of results returned " ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Key.xs:547:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘IV {aka long int}’ [-Wformat=] At Key.xs:237, croak("unsupported sort type %d", type); should be croak("unsupported sort type %" IVdf, type); At Key.xs:547, croak("wrong number of results returned " "from multikey generation sub " "(%d expected, %d returned)", nkeys, count); should be croak("wrong number of results returned " "from multikey generation sub " "(%zu expected, %" IVdf " returned)", nkeys, count);