develooper Front page | perl.perl5.porters | Postings from November 2017

[perl #132516] locale.c - warning: comparison of integers ofdifferent signs: 'int' and 'unsigned long'

Thread Previous | Thread Next
From:
Nicolas R .
Date:
November 29, 2017 21:19
Subject:
[perl #132516] locale.c - warning: comparison of integers ofdifferent signs: 'int' and 'unsigned long'
Message ID:
rt-4.0.24-25769-1511990347-1897.132516-75-0@perl.org
# New Ticket Created by  Nicolas R. 
# Please include the string:  [perl #132516]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=132516 >


notice the warning from locale.c when compiling perl with blead=8c20b11

* suggested patch: https://github.com/p5h/perl5demo/pull/36/commits/4f5b04877ec101ca669efbc0dd1c217342efc7ff
this can be fixed by setting the value to 1uL
#  define MB_CUR_MAX 1uL

* extract from compilation:
...
locale.c:2942:30: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
        is_utf8 = MB_CUR_MAX >= STRLENs(MAX_UNICODE_UTF8);
                  ~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
...


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About