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 _______________________________________________ Help-libidn mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-libidn
