[cairo-bugs] [Bug 81329] New: casts from pointer to integer of different size or vice versa on 64 bit Windows (MinGW64 and MSVC)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Jul 14 01:14:05 PDT 2014


https://bugs.freedesktop.org/show_bug.cgi?id=81329

          Priority: medium
            Bug ID: 81329
          Assignee: chris at chris-wilson.co.uk
           Summary: casts from pointer to integer of different size or
                    vice versa on 64 bit Windows (MinGW64 and MSVC)
        QA Contact: cairo-bugs at cairographics.org
          Severity: normal
    Classification: Unclassified
                OS: Windows (All)
          Reporter: peb at mppmu.mpg.de
          Hardware: x86-64 (AMD64)
            Status: NEW
           Version: 1.12.16
         Component: general
           Product: cairo

There are several instance where a pointer is cast to 'unsigned long' or vice
versa, e.g., in cairo-mempool.c and cairo-scaled-font.c.  On 64 bit Windows a
pointer has 8 bytes whereas long has only 4 bytes.  This certainly causes
compiler warnings and also might introduce bugs.

Ideally one should use uintptr_t instead of 'unsigned long' but that may not be
present everywhere.  An alternative is to use 'unsigned __int64' if and only if
_WIN64 is defined.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo-bugs/attachments/20140714/dc4f2a80/attachment.html>


More information about the cairo-bugs mailing list