webrtc_test: Fix ASAN build break 97/276197/1 accepted/tizen/unified/20220616.141953 submit/tizen/20220613.225802
authorSangchul Lee <sc11.lee@samsung.com>
Mon, 13 Jun 2022 01:10:49 +0000 (10:10 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Mon, 13 Jun 2022 01:14:03 +0000 (10:14 +0900)
It's a little strange because it only occurs in case of ASAN build with 'aarch64'.
A defensive code is added.

[  322s] /home/abuild/rpmbuild/BUILD/capi-media-webrtc-0.3.121/test/webrtc_test.c:684:6:
         error: 'i' may be used uninitialized in this function [-Werror=maybe-uninitialized]
[  322s]   684 |  int i;

[Version] 0.3.124
[Issue Type] Build break

Change-Id: I1982d219b21a4fa9b7c1d6176a5eb46798ffe447
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/capi-media-webrtc.spec
test/webrtc_test.c

index 94b571b1e68dc187bfb3508ab741db4c42d67c44..77c3f36cc09c33cae1b52d6a7558dd51a3dd0d9c 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-webrtc
 Summary:    A WebRTC library in Tizen Native API
-Version:    0.3.123
+Version:    0.3.124
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 8edb50d7bf312fde202ad23e07b96f1641e5b70c..f8fc74930868164ebc03a1e81f21adfe4407e3eb 100644 (file)
@@ -681,7 +681,7 @@ static void _webrtc_add_media_source(int index, int type, unsigned int *source_i
 {
        int ret = WEBRTC_ERROR_NONE;
        unsigned int _source_id = 0;
-       int i;
+       int i = 0;
 
        switch (type) {
        case WEBRTC_MEDIA_SOURCE_TYPE_MIC: