srt: Fix warning error
authorSeungha Yang <pudding8757@gmail.com>
Wed, 6 Dec 2017 10:15:40 +0000 (19:15 +0900)
committerOlivier Crête <olivier.crete@collabora.com>
Wed, 6 Dec 2017 17:07:54 +0000 (12:07 -0500)
gstsrt.c: In function ‘gst_srt_client_connect_full’:
gstsrt.c:151:6: error: ‘sock’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   if (sock != SRT_INVALID_SOCK) {

https://bugzilla.gnome.org/show_bug.cgi?id=791302

ext/srt/gstsrt.c

index 9983c48..6ddccd4 100644 (file)
@@ -39,7 +39,7 @@ gst_srt_client_connect_full (GstElement * elem, int sender,
     GSocketAddress ** socket_address, gint * poll_id, gchar * passphrase,
     int key_length)
 {
-  SRTSOCKET sock;
+  SRTSOCKET sock = SRT_INVALID_SOCK;
   GError *error = NULL;
   gpointer sa;
   size_t sa_len;