summaryrefslogtreecommitdiff
path: root/libgps_core.c
diff options
context:
space:
mode:
authorBernd Zeimetz <bernd@bzed.de>2011-03-28 23:12:50 +0200
committerBernd Zeimetz <bernd@bzed.de>2011-03-28 23:14:05 +0200
commitb65131e33bb2618e6c8f1cd357c7018eff9c930c (patch)
tree9fb90cb4b783cb4adb760a546fc791487d2898df /libgps_core.c
parent3fb30a6ff78824bf0f91782f7c032aff3b31a7f9 (diff)
downloadgpsd-b65131e33bb2618e6c8f1cd357c7018eff9c930c.tar.gz
Cast gpsdata->gps_fd to intptr_t as int might not be big enough.
This also fixes building with g++ >= 4.5.
Diffstat (limited to 'libgps_core.c')
-rw-r--r--libgps_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgps_core.c b/libgps_core.c
index c35ccbc5..b1f33bd1 100644
--- a/libgps_core.c
+++ b/libgps_core.c
@@ -88,7 +88,7 @@ int gps_close(struct gps_data_t *gpsdata)
libgps_debug_trace((DEBUG_CALLS, "gps_close()\n"));
#ifdef SHM_EXPORT_ENABLE
- if (gpsdata->gps_fd == -1) {
+ if ((intptr_t)(gpsdata->gps_fd) == -1) {
gps_shm_close(gpsdata);
status = 0;
}
@@ -111,7 +111,7 @@ int gps_read(struct gps_data_t *gpsdata)
libgps_debug_trace((DEBUG_CALLS, "gps_read()\n"));
#ifdef SHM_EXPORT_ENABLE
- if (gpsdata->gps_fd == -1) {
+ if ((intptr_t)(gpsdata->gps_fd) == -1) {
status = gps_shm_read(gpsdata);
}
#endif /* SHM_EXPORT_ENABLE */