[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Libidn 1.33 released
From: |
Dennis Clarke |
Subject: |
Re: Libidn 1.33 released |
Date: |
Fri, 5 Aug 2016 13:43:09 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Thunderbird/50.0a1 |
On 07/20/2016 01:58 PM, Simon Josefsson wrote:
GNU Libidn is a fully documented implementation of ...
Just a question that has me wondering about punycode_uint. I see in
lib/punycode.h this :
110 /* punycode_uint needs to be unsigned and needs to be */
111 /* at least 26 bits wide. The particular type can be */
112 /* specified by defining PUNYCODE_UINT, otherwise a */
113 /* suitable type will be chosen automatically. */
114
115 typedef uint32_t punycode_uint;
116
Then in lib/punycode.c I see this :
131 /*** Platform-specific constants ***/
132
133 /* maxint is the maximum value of a punycode_uint variable: */
134 static const punycode_uint maxint = -1;
135 /* Because maxint is unsigned, -1 becomes the maximum value. */
136
Which means that a compile with a C99 compiler results in this :
.
.
.
GEN warn-on-use.h
GEN warn-on-use.h
"punycode.c", line 134: warning: initializer will be sign-extended: -1
GEN warn-on-use.h
GEN warn-on-use.h
.
.
.
Since punycode_uint is by definition a uint32_t then shouldn't we
use UINT32_MAX here in line 134 ?
Dennis
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Libidn 1.33 released,
Dennis Clarke <=