Skip Menu |
 

This queue is for tickets about the Filter CPAN distribution.

Report information
The Basics
Id: 124479
Status: rejected
Priority: 0/
Queue: Filter

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

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



Subject: VS2017 compilation warnings
Download (untitled) / with headers
text/plain 557b
While building this module under 64-bit version of MS VS2017, I get the following build warnings: Call.xs(69): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data Call.xs(88): warning C4267: 'return': conversion from 'size_t' to 'I32', possible loss of data Call.xs(96): warning C4244: '=': conversion from '__int64' to 'int', possible loss of data Call.xs(103): warning C4267: 'return': conversion from 'size_t' to 'I32', possible loss of data Call.xs(149): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
Download (untitled) / with headers
text/plain 978b
On Mon Feb 19 18:09:59 2018, RANDIR wrote: Show quoted text
> While building this module under 64-bit version of MS VS2017, I get > the following build warnings: > > Call.xs(69): warning C4267: '=': conversion from 'size_t' to 'int', > possible loss of data > Call.xs(88): warning C4267: 'return': conversion from 'size_t' to > 'I32', possible loss of data > Call.xs(96): warning C4244: '=': conversion from '__int64' to 'int', > possible loss of data > Call.xs(103): warning C4267: 'return': conversion from 'size_t' to > 'I32', possible loss of data > Call.xs(149): warning C4244: '=': conversion from 'IV' to 'int', > possible loss of data
This is unfortunately a severe core limitation: perl.h: typedef I32 (*filter_t) (pTHX_ int, SV *, int) and PERL_CALLCONV I32 Perl_filter_read(pTHX_ int idx, SV* buffer, int maxlen) So we cannot use the natural STRLEN lengths and indices. The MSVC warnings point out that 2GB limitation, which is good. Silencing it would be wrong. -- Reini Urban
Download (untitled) / with headers
text/plain 152b
With https://github.com/rurban/Filter/commit/a8c68a6dba1defa690d2584fe7cb740271880c8d I've added some other casts, and assert on hitting the 2GB limit.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.