Bug 81329 - casts from pointer to integer of different size or vice versa on 64 bit Windows (MinGW64 and MSVC)
Summary: casts from pointer to integer of different size or vice versa on 64 bit Windo...
Status: RESOLVED MOVED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.12.16
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Chris Wilson
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-14 08:14 UTC by Peter Breitenlohner
Modified: 2018-08-25 13:54 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Peter Breitenlohner 2014-07-14 08:14:05 UTC
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.
Comment 1 GitLab Migration User 2018-08-25 13:54:59 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/263.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.