Casting for warnings.
Fixed possible segfault.
1.1 --- a/src/haptic/darwin/SDL_syshaptic.c Sun Aug 10 19:47:02 2008 +0000
1.2 +++ b/src/haptic/darwin/SDL_syshaptic.c Sun Aug 10 19:53:58 2008 +0000
1.3 @@ -162,6 +162,11 @@
1.4 }
1.5 /* IOServiceGetMatchingServices consumes dictionary. */
1.6
1.7 + if (!iter) { /* No iterator. */
1.8 + numhaptics = 0;
1.9 + return 0;
1.10 + }
1.11 +
1.12 numhaptics = 0;
1.13 while ((device = IOIteratorNext(iter)) != IO_OBJECT_NULL) {
1.14
1.15 @@ -459,7 +464,8 @@
1.16 int
1.17 SDL_SYS_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick)
1.18 {
1.19 - if (IOObjectIsEqualTo(haptic->hwdata->device, joystick->hwdata->ffservice))
1.20 + if (IOObjectIsEqualTo((io_object_t) haptic->hwdata->device,
1.21 + joystick->hwdata->ffservice))
1.22 return 1;
1.23 return 0;
1.24 }
2.1 --- a/src/joystick/darwin/SDL_sysjoystick.c Sun Aug 10 19:47:02 2008 +0000
2.2 +++ b/src/joystick/darwin/SDL_sysjoystick.c Sun Aug 10 19:53:58 2008 +0000
2.3 @@ -649,7 +649,7 @@
2.4
2.5 /* We have to do some storage of the io_service_t for
2.6 * SDL_HapticOpenFromJoystick */
2.7 - if (FFIsForceFeedback(device) == FF_OK) {
2.8 + if (FFIsForceFeedback((io_service_t)device) == FF_OK) {
2.9 device->ffservice = ioHIDDeviceObject;
2.10 }
2.11 else {