[FFmpeg-devel] [PATCH] Fix clang warning in libavfilter/vf_unsharp.c

Eli Friedman eli.friedman
Mon Jun 28 02:09:51 CEST 2010


2010/6/27 M?ns Rullg?rd <mans at mansr.com>:
> Eli Friedman <eli.friedman at gmail.com> writes:
>
>> On Sun, Jun 27, 2010 at 3:47 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
>>> On Sun, Jun 27, 2010 at 11:17:30AM -0700, Eli Friedman wrote:
>>>> Patch attached; clang warns on " =- " because it looks like a typo for " -= ".
>>>
>>> can you also fix our patcheck so it detects these?
>>
>> Attached.
>>
>> -Eli
>>
>> Index: tools/patcheck
>> ===================================================================
>> --- tools/patcheck ? ?(revision 23833)
>> +++ tools/patcheck ? ?(working copy)
>> @@ -42,6 +42,7 @@
>> ?hiegrep 'for *\( *'"$ERE_PRITYP"' ' ?'not gcc 2.95 compatible' $*
>> ?hiegrep '(static|inline|const) *\1' ?'duplicate word' $*
>> ?hiegrep 'INIT_VLC_USE_STATIC' 'forbidden ancient vlc type' $*
>> +hiegrep ' =[+-] ' 'looks like compound increment/decrement' $*
>
> The correct term is "compound assignment", and checking for a few more
> of them might be a good idea if we're going to be doing this at all.

Updated version addressing comments.

-Eli
-------------- next part --------------
Index: tools/patcheck
===================================================================
--- tools/patcheck	(revision 23833)
+++ tools/patcheck	(working copy)
@@ -42,6 +42,7 @@
 hiegrep 'for *\( *'"$ERE_PRITYP"' '  'not gcc 2.95 compatible' $*
 hiegrep '(static|inline|const) *\1'  'duplicate word' $*
 hiegrep 'INIT_VLC_USE_STATIC' 'forbidden ancient vlc type' $*
+hiegrep '=[-+\*\&] ' 'looks like compound assignment' $*
 
 hiegrep2 '(int|unsigned|static|void)[a-zA-Z0-9 _]*(init|end)[a-zA-Z0-9 _]*\(.*[^;]$' '(av_cold|:\+[^a-zA-Z_])' 'These functions may need av_cold, please review the whole patch for similar functions needing av_cold' $*
 



More information about the ffmpeg-devel mailing list