vcl/source/filter/jpeg/Exif.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 906eaf8a44f1ba8d08d5f8f74019c22fef4e5a05
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Tue Jun 18 12:13:57 2019 +0200
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Tue Jun 18 13:28:13 2019 +0200

    Better type safety
    
    ...following up on 42c0e433aca68c669bc0f55af404b6bae1655fba "Avoid
    -fsanitize=misaligned-pointer-use"
    
    Change-Id: I1ff787c7da829e838843c895d32dea3aa26e2cf4
    Reviewed-on: https://gerrit.libreoffice.org/74263
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/vcl/source/filter/jpeg/Exif.cxx b/vcl/source/filter/jpeg/Exif.cxx
index 187d5ac6efc6..9088d9117494 100644
--- a/vcl/source/filter/jpeg/Exif.cxx
+++ b/vcl/source/filter/jpeg/Exif.cxx
@@ -150,7 +150,7 @@ bool Exif::processJpeg(SvStream& rStream, bool bSetValue)
 
 namespace {
 
-sal_uInt16 read16(sal_uInt8 const * data, bool littleEndian) {
+sal_uInt16 read16(sal_uInt8 const (& data)[2], bool littleEndian) {
     if (littleEndian) {
         return data[0] | (sal_uInt16(data[1]) << 8);
     } else {
@@ -158,7 +158,7 @@ sal_uInt16 read16(sal_uInt8 const * data, bool 
littleEndian) {
     }
 }
 
-void write16(sal_uInt16 value, sal_uInt8 * data, bool littleEndian) {
+void write16(sal_uInt16 value, sal_uInt8 (& data)[2], bool littleEndian) {
     if (littleEndian) {
         data[0] = value & 0xFF;
         data[1] = value >> 8;
@@ -168,7 +168,7 @@ void write16(sal_uInt16 value, sal_uInt8 * data, bool 
littleEndian) {
     }
 }
 
-sal_uInt32 read32(sal_uInt8 const * data, bool littleEndian) {
+sal_uInt32 read32(sal_uInt8 const (& data)[4], bool littleEndian) {
     if (littleEndian) {
         return data[0] | (sal_uInt32(data[1]) << 8)
             | (sal_uInt32(data[2]) << 16) | (sal_uInt32(data[3]) << 24);
@@ -178,7 +178,7 @@ sal_uInt32 read32(sal_uInt8 const * data, bool 
littleEndian) {
     }
 }
 
-void write32(sal_uInt32 value, sal_uInt8 * data, bool littleEndian) {
+void write32(sal_uInt32 value, sal_uInt8 (& data)[4], bool littleEndian) {
     if (littleEndian) {
         data[0] = value & 0xFF;
         data[1] = (value >> 8) & 0xFF;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to