[FFmpeg-devel] [PATCH 10/11] rtsp: fix compiler warning for uninitialized variables
Martin Storsjö
martin at martin.st
Tue Jan 3 22:51:27 CET 2012
On Sat, 31 Dec 2011, Michael Niedermayer wrote:
> On Fri, Dec 30, 2011 at 09:08:07PM +0100, Jean First wrote:
>>
>> Signed-off-by: Jean First <jeanfirst at gmail.com>
>> ---
>> libavformat/rtsp.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
>> index 5d6db1b..d32f49e 100644
>> --- a/libavformat/rtsp.c
>> +++ b/libavformat/rtsp.c
>> @@ -1103,7 +1103,7 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port,
>> int lower_transport, const char *real_challenge)
>> {
>> RTSPState *rt = s->priv_data;
>> - int rtx, j, i, err, interleave = 0;
>> + int rtx = 0, j, i, err, interleave = 0;
>> RTSPStream *rtsp_st;
>> RTSPMessageHeader reply1, *reply = &reply1;
>> char cmd[2048];
>
> i think its ok, maybe ronald or martin want to comment too though ?
As far as I know this code, the variable won't ever be used uninitialized,
but silencing the warning is of course good. I don't mind either zero
initialization or av_uninit (this isn't even remotely performance
sensitive).
// Martin
More information about the ffmpeg-devel
mailing list