[FFmpeg-cvslog] r11690 - trunk/libavcodec/h263.c

Mike Melanson mike
Thu Jan 31 05:31:09 CET 2008


Rich Felker wrote:
> On Wed, Jan 30, 2008 at 07:56:54PM -0800, Mike Melanson wrote:
>> Rich Felker wrote:
>>> On Thu, Jan 31, 2008 at 03:13:53AM +0100, michael wrote:
>>>> Author: michael
>>>> Date: Thu Jan 31 03:13:53 2008
>>>> New Revision: 11690
>>>>
>>>> Log:
>>>> Comment about weird warning prevention.
>>>>
>>>>
>>>> Modified:
>>>>    trunk/libavcodec/h263.c
>>>>
>>>> Modified: trunk/libavcodec/h263.c
>>>> ==============================================================================
>>>> --- trunk/libavcodec/h263.c	(original)
>>>> +++ trunk/libavcodec/h263.c	Thu Jan 31 03:13:53 2008
>>>> @@ -4727,7 +4727,7 @@ static inline int mpeg4_decode_block(Mpe
>>>>                                int n, int coded, int intra, int rvlc)
>>>>  {
>>>>      int level, i, last, run;
>>>> -    int dc_pred_dir= dc_pred_dir;
>>>> +    int dc_pred_dir= dc_pred_dir; //weird init to prevent uninitalized warning
>>> This code is INVALID C and needs to be removed. A program containing
>>> this line has undefined behavior. Writing invalid C is not a
>>> legitimate way to silence gcc's bullshit warnings.
>> Could we compromise using a global variable?
> 
> Huh? How would that help? It would make the code potentially slower
> AND would make the whole library non-reentrant!!!

Ah. I knew there was a good reason.

Maybe thread-local storage? :)

-- 
	-Mike Melanson




More information about the ffmpeg-cvslog mailing list