[Ffmpeg-cvslog] r6338 - in trunk: ffmpeg.c libavcodec/mpegvideo.c libavcodec/ratecontrol.c libavcodec/snow.c

Michael Niedermayer michaelni
Fri Sep 29 19:51:02 CEST 2006


Hi

On Thu, Sep 28, 2006 at 06:28:55PM +0200, Guillaume POIRIER wrote:
> Hi,
> 
> On 9/28/06, Panagiotis Issaris <takis.issaris at uhasselt.be> wrote:
> >Hi,
> >
> >On wo, 2006-09-27 at 23:17 +0100, M?ns Rullg?rd wrote:
> 
> [..]
> 
> >> To takis: please pay attention to compiler warnings when you make 
> >changes.
> >You are right. But, "make mpegvideo.o | grep warning|wc -l" returns 324 on 
> >my
> >system, which makes it difficult to see the new ones in the pages of
> >existing warnings...
> 
> I guess it's high time to have regression tests check for the number
> of warnings ;-P

wont work as different gcc versions will produce different warnings,
actualy even the same gcc will produce different ones depending
on optimization levels (and no i dont mean -Winline related ones)

a better and more generically useable solution would be to change
colorgcc (which is a simple perl script which colorizes gcc output)
so that it caches the output of the last time or of some reference run
and makes new warnings blink or so ...

<OT>attached is a little old patch to colorgcc which makes it colorize
different warnings differently</OT>

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is
-------------- next part --------------
--- /usr/bin/colorgcc	2005-03-25 16:45:18.000000000 +0100
+++ /home/michael/bin/colorgcc	2005-08-22 23:55:01.000000000 +0200
@@ -99,9 +99,17 @@
    $colors{"srcColor"} = color("cyan");
    $colors{"introColor"} = color("blue");
 
-   $colors{"warningFileNameColor"} = color("yellow");
-   $colors{"warningNumberColor"}   = color("yellow");
-   $colors{"warningMessageColor"}  = color("yellow");
+   $colors{"infoFileNameColor"} = color("green");
+   $colors{"infoNumberColor"}   = color("green");
+   $colors{"infoMessageColor"}  = color("green");
+
+   $colors{"pedanticFileNameColor"} = color("yellow");
+   $colors{"pedanticNumberColor"}   = color("yellow");
+   $colors{"pedanticMessageColor"}  = color("yellow");
+
+   $colors{"warningFileNameColor"} = color("bold yellow");
+   $colors{"warningNumberColor"}   = color("bold yellow");
+   $colors{"warningMessageColor"}  = color("bold yellow");
 
    $colors{"errorFileNameColor"} = color("bold red");
    $colors{"errorNumberColor"}   = color("bold red");
@@ -255,12 +263,28 @@
       $field2 = $2 || "";
       $field3 = $3 || "";
 
-      if ($field3 =~ m/\s+warning:.*/)
+      if ($field3 =~ m/\s+warning:\s*(.*)/)
       {
-	 # Warning
-	 print($colors{"warningFileNameColor"}, "$field1:", color("reset"));
-	 print($colors{"warningNumberColor"}, "$field2:", color("reset"));
-	 srcscan($field3, $colors{"warningMessageColor"});
+         $warning = $1 || "";
+         if($warning =~ m/^unused variable|^unused parameter|defined but not used$|is not at beginning of declaration$|missing initializer$|^.near initialization/)
+         {
+            print($colors{"infoFileNameColor"}, "$field1:", color("reset"));
+            print($colors{"infoNumberColor"}, "$field2:", color("reset"));
+            srcscan($field3, $colors{"infoMessageColor"});
+         }
+         elsif($warning =~ m/differ in signedness$|comparison between signed and unsigned$|signed and unsigned type in conditional expression$|not handled in switch$/)
+         {
+            print($colors{"pedanticFileNameColor"}, "$field1:", color("reset"));
+            print($colors{"pedanticNumberColor"}, "$field2:", color("reset"));
+            srcscan($field3, $colors{"pedanticMessageColor"});
+         }
+         else
+         {
+            # Warning
+            print($colors{"warningFileNameColor"}, "$field1:", color("reset"));
+            print($colors{"warningNumberColor"}, "$field2:", color("reset"));
+            srcscan($field3, $colors{"warningMessageColor"});
+         }
       }
       else 
       {



More information about the ffmpeg-cvslog mailing list