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

          Priority: medium
            Bug ID: 75280
                CC: libreoffice@lists.freedesktop.org,
                    vicenzi.alexan...@gmail.com
          Assignee: libreoffice-b...@lists.freedesktop.org
           Summary: [Easyhack] Convert inappropriate use of sal_uIntPtr to
                    better integer types
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: mst...@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.
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to