Bug 1054176 - fix some warnings about unitialized values and bad assign r=kinetik
authorLandry Breuil <landry@openbsd.org>
Mon, 18 Aug 2014 11:38:08 +0200
changeset 200128 1e3389bb8455196954537282af827e66ce16cdf8
parent 200127 0b83d221b3d3807a78ccdaf84aff75c7715c236b
child 200129 006353e45fa746f26f9eb2e9ab078eb8cc741fca
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewerskinetik
bugs1054176
milestone34.0a1
Bug 1054176 - fix some warnings about unitialized values and bad assign r=kinetik
media/libcubeb/src/cubeb_sndio.c
--- a/media/libcubeb/src/cubeb_sndio.c
+++ b/media/libcubeb/src/cubeb_sndio.c
@@ -62,17 +62,17 @@ sndio_onmove(void *arg, int delta)
 }
 
 static void *
 sndio_mainloop(void *arg)
 {
 #define MAXFDS 8
   struct pollfd pfds[MAXFDS];
   cubeb_stream *s = arg;
-  int n, nfds, revents, state;
+  int n, nfds, revents, state = CUBEB_STATE_STARTED;
   size_t start = 0, end = 0;
   long nfr;
 
   DPR("sndio_mainloop()\n");
   s->state_cb(s, s->arg, CUBEB_STATE_STARTED);
   pthread_mutex_lock(&s->mtx);
   if (!sio_start(s->hdl)) {
     pthread_mutex_unlock(&s->mtx);
@@ -266,17 +266,17 @@ sndio_get_preferred_sample_rate(cubeb * 
 
   return CUBEB_OK;
 }
 
 static int
 sndio_get_min_latency(cubeb * ctx, cubeb_stream_params params, uint32_t * latency_ms)
 {
   // XXX Not yet implemented.
-  latency_ms = 40;
+  *latency_ms = 40;
 
   return CUBEB_OK;
 }
 
 static void
 sndio_stream_destroy(cubeb_stream *s)
 {
   DPR("sndio_stream_destroy()\n");