[haiku-commits] haiku: hrev53420 - in src/add-ons: accelerants/ati accelerants/3dfx accelerants/s3 input_server/devices/serial_mouse

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 30 Aug 2019 10:10:24 -0400 (EDT)

hrev53420 adds 4 changesets to branch 'master'
old head: f31e9e37d912d2610d47e50360a2524af2792b66
new head: 3f388e607f400ccd68246c9680ebe79332d3366d
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=3f388e607f40+%5Ef31e9e37d912

----------------------------------------------------------------------------

c6e4214796bd: SerialMouse.h: Fix broken code
  
  error: 'typedef' was ignored in this declaration
  
  Signed-off-by: Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
  Change-Id: Iad5b398d750ed76f352510b625867fab05e1411d
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/1770
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

6a9b2bf7f413: 3dfx: fix invalid type casts
  
  Signed-off-by: Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
  Change-Id: I3afb2ff4441524be62287c460ef82e82cedfcc2a
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/1771
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

ca759905f868: ati: Fix invalid type casts
  
  Signed-off-by: Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
  Change-Id: Ifc968ae6f8c485c1ea050430814ae6cfeecdbd44
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/1772
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

3f388e607f40: s3: Fix invalid type casts
  
  Signed-off-by: Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
  Change-Id: If742f17efb02ef78ce7ca2475f126735f802e8aa
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/1773
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

                                   [ Jaroslaw Pelczar <jarek@xxxxxxxxxxxx> ]

----------------------------------------------------------------------------

4 files changed, 13 insertions(+), 13 deletions(-)
src/add-ons/accelerants/3dfx/overlay.cpp                   |  8 ++++----
src/add-ons/accelerants/ati/overlay.cpp                    | 10 +++++-----
src/add-ons/accelerants/s3/savage_edid.cpp                 |  6 +++---
.../input_server/devices/serial_mouse/SerialMouse.h        |  2 +-

############################################################################

Commit:      c6e4214796bd089bbe68da725570b2d9748cd885
URL:         https://git.haiku-os.org/haiku/commit/?id=c6e4214796bd
Author:      Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
Date:        Wed Aug 28 15:07:04 2019 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Fri Aug 30 14:10:18 2019 UTC

SerialMouse.h: Fix broken code

error: 'typedef' was ignored in this declaration

Signed-off-by: Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
Change-Id: Iad5b398d750ed76f352510b625867fab05e1411d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1770
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

----------------------------------------------------------------------------

diff --git a/src/add-ons/input_server/devices/serial_mouse/SerialMouse.h 
b/src/add-ons/input_server/devices/serial_mouse/SerialMouse.h
index cb64dff3d1..0a5e13e41c 100644
--- a/src/add-ons/input_server/devices/serial_mouse/SerialMouse.h
+++ b/src/add-ons/input_server/devices/serial_mouse/SerialMouse.h
@@ -3,7 +3,7 @@
 
 #include <keyboard_mouse_driver.h>
 
-typedef enum mouse_id {
+enum mouse_id {
        kNoDevice               = -2,
        kUnknown                = -1,   // Something there, but can't recognize 
it yet.
        kNotSet                 =  0,

############################################################################

Commit:      6a9b2bf7f413ee145d87319686692ae7b7440287
URL:         https://git.haiku-os.org/haiku/commit/?id=6a9b2bf7f413
Author:      Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
Date:        Wed Aug 28 15:07:15 2019 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Fri Aug 30 14:10:18 2019 UTC

3dfx: fix invalid type casts

Signed-off-by: Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
Change-Id: I3afb2ff4441524be62287c460ef82e82cedfcc2a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1771
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

----------------------------------------------------------------------------

diff --git a/src/add-ons/accelerants/3dfx/overlay.cpp 
b/src/add-ons/accelerants/3dfx/overlay.cpp
index ca5d711cd4..206c50d150 100644
--- a/src/add-ons/accelerants/3dfx/overlay.cpp
+++ b/src/add-ons/accelerants/3dfx/overlay.cpp
@@ -95,7 +95,7 @@ AllocateOverlayBuffer(color_space colorSpace, uint16 width, 
uint16 height)
        // If no buffers have been allocated, prevBuffAddr calculated here will 
be
        // the address where the buffer area will start.
 
-       uint32 prevBuffAddr = si.videoMemAddr + si.frameBufferOffset
+       addr_t prevBuffAddr = si.videoMemAddr + si.frameBufferOffset
                                                + si.maxFrameBufferSize;
 
        while (ovBuff != NULL) {
@@ -103,11 +103,11 @@ AllocateOverlayBuffer(color_space colorSpace, uint16 
width, uint16 height)
                // buffer and the start of the previous buffer to allocate the 
new
                // buffer.
 
-               uint32 currentBuffEndAddr = (addr_t)ovBuff->buffer + 
ovBuff->size;
+               addr_t currentBuffEndAddr = (addr_t)ovBuff->buffer + 
ovBuff->size;
                if ((prevBuffAddr - currentBuffEndAddr) >= buffSize)
                        break;          // sufficient space for the new buffer
 
-               prevBuffAddr = (uint32)ovBuff->buffer;
+               prevBuffAddr = (addr_t)ovBuff->buffer;
                prevOvBuff = ovBuff;
                ovBuff = ovBuff->nextBuffer;
        }
@@ -121,7 +121,7 @@ AllocateOverlayBuffer(color_space colorSpace, uint16 width, 
uint16 height)
                // ends so that it can be determined if there is sufficient 
space for
                // the new buffer to be created.
 
-               uint32 fbEndAddr = si.videoMemAddr + si.frameBufferOffset
+               addr_t fbEndAddr = si.videoMemAddr + si.frameBufferOffset
                        + (si.displayMode.virtual_width * 
si.displayMode.bytesPerPixel
                        * si.displayMode.virtual_height);
 

############################################################################

Commit:      ca759905f8684cbcc1fe36eda94ac4f34f7c762d
URL:         https://git.haiku-os.org/haiku/commit/?id=ca759905f868
Author:      Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
Date:        Wed Aug 28 15:07:24 2019 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Fri Aug 30 14:10:18 2019 UTC

ati: Fix invalid type casts

Signed-off-by: Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
Change-Id: Ifc968ae6f8c485c1ea050430814ae6cfeecdbd44
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1772
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

----------------------------------------------------------------------------

diff --git a/src/add-ons/accelerants/ati/overlay.cpp 
b/src/add-ons/accelerants/ati/overlay.cpp
index 53479f8c67..4d45e1d6e3 100644
--- a/src/add-ons/accelerants/ati/overlay.cpp
+++ b/src/add-ons/accelerants/ati/overlay.cpp
@@ -91,18 +91,18 @@ AllocateOverlayBuffer(color_space colorSpace, uint16 width, 
uint16 height)
        // thus, if the overlay buffer overflows it will be less apt to affect 
the
        // cursor.
 
-       uint32 prevBuffAddr = (si.videoMemAddr + si.cursorOffset - 0xfff) & 
~0xfff;
+       addr_t prevBuffAddr = (si.videoMemAddr + si.cursorOffset - 0xfff) & 
~0xfff;
 
        while (ovBuff != NULL) {
                // Test if there is sufficient space between the end of the 
current
                // buffer and the start of the previous buffer to allocate the 
new
                // buffer.
 
-               uint32 currentBuffEndAddr = (addr_t)ovBuff->buffer + 
ovBuff->size;
+               addr_t currentBuffEndAddr = (addr_t)ovBuff->buffer + 
ovBuff->size;
                if ((prevBuffAddr - currentBuffEndAddr) >= buffSize)
                        break;          // sufficient space for the new buffer
 
-               prevBuffAddr = (uint32)ovBuff->buffer;
+               prevBuffAddr = (addr_t)ovBuff->buffer;
                prevOvBuff = ovBuff;
                ovBuff = ovBuff->nextBuffer;
        }
@@ -116,7 +116,7 @@ AllocateOverlayBuffer(color_space colorSpace, uint16 width, 
uint16 height)
                // ends so that it can be determined if there is sufficient 
space for
                // the new buffer to be created.
 
-               uint32 fbEndAddr = si.videoMemAddr + si.frameBufferOffset
+               addr_t fbEndAddr = si.videoMemAddr + si.frameBufferOffset
                        + (si.displayMode.virtual_width
                        * ((si.displayMode.bitsPerPixel + 7) / 8)       // 
bytes per pixel
                        * si.displayMode.virtual_height);
@@ -255,7 +255,7 @@ AllocateOverlay(void)
                return NULL;
        }
 
-       return (overlay_token)++si.overlayToken;
+       return (overlay_token)(addr_t)++si.overlayToken;
 }
 
 

############################################################################

Revision:    hrev53420
Commit:      3f388e607f400ccd68246c9680ebe79332d3366d
URL:         https://git.haiku-os.org/haiku/commit/?id=3f388e607f40
Author:      Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
Date:        Wed Aug 28 15:07:32 2019 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Fri Aug 30 14:10:18 2019 UTC

s3: Fix invalid type casts

Signed-off-by: Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
Change-Id: If742f17efb02ef78ce7ca2475f126735f802e8aa
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1773
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

----------------------------------------------------------------------------

diff --git a/src/add-ons/accelerants/s3/savage_edid.cpp 
b/src/add-ons/accelerants/s3/savage_edid.cpp
index 9bea23ab8c..a630a6cb15 100644
--- a/src/add-ons/accelerants/s3/savage_edid.cpp
+++ b/src/add-ons/accelerants/s3/savage_edid.cpp
@@ -23,7 +23,7 @@
 static status_t
 GetI2CSignals(void* cookie, int* _clock, int* data)
 {
-       uint32 index = (uint32)cookie;
+       uint32 index = (uint32)(addr_t)cookie;
        uint8 value = ReadCrtcReg(index);
 
        *_clock = (value & 0x4) != 0;
@@ -35,7 +35,7 @@ GetI2CSignals(void* cookie, int* _clock, int* data)
 static status_t
 SetI2CSignals(void* cookie, int _clock, int data)
 {
-       uint32 index = (uint32)cookie;
+       uint32 index = (uint32)(addr_t)cookie;
        uint8 value = 0x10;
 
        if (_clock)
@@ -75,7 +75,7 @@ Savage_GetEdidInfo(edid1_info& edidInfo)
     }
 
        i2c_bus bus;
-       bus.cookie = (void*)DDCPort;
+       bus.cookie = (void*)(addr_t)DDCPort;
        bus.set_signals = &SetI2CSignals;
        bus.get_signals = &GetI2CSignals;
        ddc2_init_timing(&bus);


Other related posts:

  • » [haiku-commits] haiku: hrev53420 - in src/add-ons: accelerants/ati accelerants/3dfx accelerants/s3 input_server/devices/serial_mouse - waddlesplash