diff options
author | Jan Schmidt <jan.schmidt@sun.com> | 2009-06-06 13:17:49 +0100 |
---|---|---|
committer | Jan Schmidt <jan.schmidt@sun.com> | 2009-06-06 13:17:49 +0100 |
commit | 10e4d6c74d0b456541d2d5359af4d04d005a2ebc (patch) | |
tree | 560da8e063162f0522eeae891bad8a1bb206fb65 /ext/apexsink/gstapexraop.c | |
parent | e2ef7a2a8ae317299051fbe10014f1b24ed5107e (diff) | |
download | gstreamer-plugins-bad-10e4d6c74d0b456541d2d5359af4d04d005a2ebc.tar.gz |
apexsink: Fix compiler warnings
Fix compile warnings on solaris from bzero not being declared (use
memset instead), and strict-aliasing warnings (use a temporary
variable).
Diffstat (limited to 'ext/apexsink/gstapexraop.c')
-rw-r--r-- | ext/apexsink/gstapexraop.c | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/ext/apexsink/gstapexraop.c b/ext/apexsink/gstapexraop.c index 98b7d8634..4d07674b0 100644 --- a/ext/apexsink/gstapexraop.c +++ b/ext/apexsink/gstapexraop.c @@ -28,6 +28,8 @@ #include "config.h" #endif +#include <string.h> + #include "gstapexraop.h" /* private constants */ @@ -100,7 +102,7 @@ gst_apexraop_send (int desc, void *data, size_t len) static int gst_apexraop_recv (int desc, void *data, size_t len) { - bzero (data, len); + memset (data, 0, len); return recv (desc, data, len, 0); } @@ -345,7 +347,11 @@ gst_apexraop_connect (GstApExRAOP * con) GST_APEX_RAOP_HDR_DEFAULT_LENGTH) <= 0) return GST_RTSP_STS_GONE; - sscanf (hreq, "%*s %d", (int *) &res); + { + int tmp; + sscanf (hreq, "%*s %d", &tmp); + res = (GstRTSPStatusCode) tmp; + } if (res != GST_RTSP_STS_OK) return res; @@ -393,7 +399,11 @@ gst_apexraop_connect (GstApExRAOP * con) GST_APEX_RAOP_HDR_DEFAULT_LENGTH) <= 0) return GST_RTSP_STS_GONE; - sscanf (hreq, "%*s %d", (int *) &res); + { + int tmp; + sscanf (hreq, "%*s %d", &tmp); + res = (GstRTSPStatusCode) tmp; + } if (res != GST_RTSP_STS_OK) return res; @@ -432,7 +442,11 @@ gst_apexraop_connect (GstApExRAOP * con) GST_APEX_RAOP_HDR_DEFAULT_LENGTH) <= 0) return GST_RTSP_STS_GONE; - sscanf (hreq, "%*s %d", (int *) &res); + { + int tmp; + sscanf (hreq, "%*s %d", &tmp); + res = (GstRTSPStatusCode) tmp; + } if (res != GST_RTSP_STS_OK) return res; @@ -553,7 +567,11 @@ gst_apexraop_set_volume (GstApExRAOP * con, const guint volume) GST_APEX_RAOP_HDR_DEFAULT_LENGTH) <= 0) return GST_RTSP_STS_GONE; - sscanf (hreq, "%*s %d", (int *) &res); + { + int tmp; + sscanf (hreq, "%*s %d", &tmp); + res = (GstRTSPStatusCode) tmp; + } return res; } @@ -695,7 +713,11 @@ gst_apexraop_flush (GstApExRAOP * con) GST_APEX_RAOP_HDR_DEFAULT_LENGTH) <= 0) return GST_RTSP_STS_GONE; - sscanf (hreq, "%*s %d", (int *) &res); + { + int tmp; + sscanf (hreq, "%*s %d", &tmp); + res = (GstRTSPStatusCode) tmp; + } return res; } |