Opened 8 years ago

Closed 8 years ago

#6348 closed defect (fixed)

GUINTBIG_MAX in cpl_port.h needs explanation

Reported by: Kurt Schwehr Owned by: Even Rouault
Priority: normal Milestone:
Component: default Version: svn-trunk
Severity: normal Keywords:


GUINTBIG_MAX could a comment to explain why the HAVE_LONG_LONG case uses a signed constant that is shifted left. Why are we using a signed value here? This was done in r31066.

#if defined(WIN32) && defined(_MSC_VER)

#define GUINTBIG_MAX     (((GUIntBig)(0xFFFFFFFFU) << 32) | 0xFFFFFFFFU)


#define GUINTBIG_MAX     (((GUIntBig)(0xFFFFFFFF) << 32) | 0xFFFFFFFFU)
//                           ^ casting an signed value to unsigned?




Change History (1)

comment:1 by Even Rouault, 8 years ago

Resolution: fixed
Status: newclosed

Good catch. More than an explanation, it needed a fix :

r33331 "Fix definition of GUINTBIG_MAX in HAVE_LONG_LONG case to use only unsigned constants (trunk only, #6348)"

Note: See TracTickets for help on using tickets.