[Bug 75280] New: [Easyhack] Convert inappropriate use of sal_uIntPtr to better integer types

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Feb 20 12:53:32 PST 2014


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

          Priority: medium
            Bug ID: 75280
                CC: libreoffice at lists.freedesktop.org,
                    vicenzi.alexandre at gmail.com
          Assignee: libreoffice-bugs at lists.freedesktop.org
           Summary: [Easyhack] Convert inappropriate use of sal_uIntPtr to
                    better integer types
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: mstahl at redhat.com
          Hardware: Other
            Status: NEW
           Version: Inherited From OOo
         Component: Libreoffice
           Product: LibreOffice

During the removal of the tools types, the ULONG type was initially
converted to sal_uIntPtr, before those doing that work switched to
using the stop-gap sal_uLong type instead.

sal_uIntPtr has a very special purpose, variables of this type
hold pointers that are converted to integers.

any use of the sal_uIntPtr type that is actually "just" an integer
should be replaced by an appropriate unsigned integer type,
depending on the situation sal_uInt32, sal_uInt64, size_t or
"unsigned int" are likely candidates.

as an example, take the UniqueIndexImpl class.
it stores sal_uInt32 internally but its public interfaces are
defined on sal_uIntPtr; it is obvious that sal_uIntPtr should
be replaced by sal_uInt32 here in UniqueIndexImpl and its clients.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20140220/6d3fccfb/attachment.html>


More information about the LibreOffice mailing list