summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2013-10-31 11:15:07 +0100
committerDavid Herrmann <dh.herrmann@gmail.com>2013-10-31 11:15:07 +0100
commit174169e144d89fddbae531ae68ca04d9c3377e5f (patch)
treead87f9e8595b0167e25adbded7d8920f8ce33433
parentfcf19a18767882d90492c1e681059fd779248035 (diff)
Fix some random uninitialized-var warnings
Besides on r = 0; initialization, all of these are false warnings. Stupid gcc.. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
-rw-r--r--src/p2pd.c1
-rw-r--r--src/rtsp_decoder.c2
-rw-r--r--src/wpa_ctrl.c1
-rw-r--r--tools/openwfd_ie.c4
4 files changed, 7 insertions, 1 deletions
diff --git a/src/p2pd.c b/src/p2pd.c
index d96ea7a..cfdb429 100644
--- a/src/p2pd.c
+++ b/src/p2pd.c
@@ -141,6 +141,7 @@ static int owfd_p2pd_dispatch(struct owfd_p2pd *p2pd)
n = max;
}
+ r = 0;
ep.evs = evs;
ep.num = n;
for (i = 0; i < n; ++i) {
diff --git a/src/rtsp_decoder.c b/src/rtsp_decoder.c
index 5455a77..68f5866 100644
--- a/src/rtsp_decoder.c
+++ b/src/rtsp_decoder.c
@@ -456,7 +456,7 @@ static ssize_t feed_char_header_nl(struct owfd_rtsp_decoder *dec,
static ssize_t feed_char(struct owfd_rtsp_decoder *dec, char ch, size_t rlen)
{
- ssize_t r;
+ ssize_t r = 0;
switch (dec->state) {
case STATE_NEW:
diff --git a/src/wpa_ctrl.c b/src/wpa_ctrl.c
index 2403057..fbfc85f 100644
--- a/src/wpa_ctrl.c
+++ b/src/wpa_ctrl.c
@@ -517,6 +517,7 @@ int owfd_wpa_ctrl_dispatch(struct owfd_wpa_ctrl *wpa, int timeout)
n = max;
}
+ r = 0;
for (i = 0; i < n; ++i) {
e = &ev[i];
if (e->data.ptr == &wpa->ev_fd)
diff --git a/tools/openwfd_ie.c b/tools/openwfd_ie.c
index 334e455..7eb6911 100644
--- a/tools/openwfd_ie.c
+++ b/tools/openwfd_ie.c
@@ -122,6 +122,10 @@ static void print_ie(const void *data, size_t len)
}
col = NULL;
+ c = NULL;
+ sub = NULL;
+ sl = 0;
+
while (len > 0) {
ie = data;