srtp: Mark a few variables as uninitialized

Message ID 1358256053-22095-1-git-send-email-martin@martin.st
State Committed
Commit 42364fcbcac99c42a9859c3662a2956e5554b68c
Headers show

Commit Message

Martin Storsjö Jan. 15, 2013, 1:20 p.m.
This squelches false positive warnings (with gcc) about them being
used uninitalized.
---
 libavformat/srtp.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Luca Barbato Jan. 15, 2013, 4:57 p.m. | #1
On 15/01/13 14:20, Martin Storsjö wrote:
> This squelches false positive warnings (with gcc) about them being
> used uninitalized.
> ---
>  libavformat/srtp.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Ok.

Patch

diff --git a/libavformat/srtp.c b/libavformat/srtp.c
index 9ff1401..e603851 100644
--- a/libavformat/srtp.c
+++ b/libavformat/srtp.c
@@ -121,8 +121,8 @@  int ff_srtp_decrypt(struct SRTPContext *s, uint8_t *buf, int *lenptr)
 {
     uint8_t iv[16] = { 0 }, hmac[20];
     int len = *lenptr;
-    int ext, seq_largest;
-    uint32_t ssrc, roc;
+    int ext, av_uninit(seq_largest);
+    uint32_t ssrc, av_uninit(roc);
     uint64_t index;
     int rtcp;