tools/summarise_rvct_errors.pl
changeset 4 c0296ad2454d
parent 3 5578c2bec847
child 6 2618a0f10e3e
equal deleted inserted replaced
3:5578c2bec847 4:c0296ad2454d
    62 my %all_message_counts;
    62 my %all_message_counts;
    63 my $next_message_id = 1;
    63 my $next_message_id = 1;
    64 my %packages_by_file;
    64 my %packages_by_file;
    65 my %package_count_by_file;
    65 my %package_count_by_file;
    66 
    66 
       
    67 my $linktarget = "";
       
    68 my %visibility_problems;
    67 
    69 
    68 my $line;
    70 my $line;
    69 while ($line = <>)
    71 while ($line = <>)
    70 	{
    72 	{
    71 	# </pre>os/usb, usb_CompilerCompatibility.005, SF_builds/usb/builds/CompilerCompatibility/usb_CompilerCompatibility.005/html/os_usb_failures.html
    73 	# </pre>os/usb, usb_CompilerCompatibility.005, SF_builds/usb/builds/CompilerCompatibility/usb_CompilerCompatibility.005/html/os_usb_failures.html
    75 		$current_package = $1;
    77 		$current_package = $1;
    76 		$current_package =~ s/_/\//;
    78 		$current_package =~ s/_/\//;
    77 		next;
    79 		next;
    78 		}
    80 		}
    79 
    81 
       
    82 	# ... &#39;--soname=glxgridviewplugin{000a0000}[20000a03].dll&x39; ...
       
    83 	
       
    84 	if ($line =~ /--soname=(\S+)(.000a0000.)?(\S+)[&']/)
       
    85 		{
       
    86 		$linktarget = $1.$3;
       
    87 		next;
       
    88 		}
       
    89 
       
    90 	# Error: L6410W: Symbol CGlxGridViewPluginBase::AddCommandHandlersL() with non STV_DEFAULT visibility STV_HIDDEN should be resolved statically, cannot use definition in glxgridviewpluginbase{000a0000}.dso.
       
    91   
       
    92   if ($line =~ /Error: L6410W: Symbol (.*) with .*, cannot use definition in (\S+)./)
       
    93   	{
       
    94   	my $symbol = $1;
       
    95   	my $dll = $2;
       
    96 		$symbol =~ s/&amp;/&/g;
       
    97 		$symbol =~ s/&gt;/>/g;
       
    98 		$symbol =~ s/&lt;/</g;
       
    99   	$visibility_problems{"$current_package\t$dll:\t$symbol\timpacts $linktarget"} = 1;
       
   100   	next;
       
   101 		}
       
   102 	# Error: L6218E: Undefined symbol RHTTPTransaction::Session() const (referred from caldavutils.o).
       
   103 	
       
   104 	if ($line =~ /Error: L6218E: Undefined symbol (.*) \(referred from (\S+)\)/)
       
   105 		{
       
   106 		my $symbol = $1;
       
   107 		my $impacted = $2;
       
   108 		$symbol =~ s/&amp;/&/g;
       
   109 		$symbol =~ s/&gt;/>/g;
       
   110 		$symbol =~ s/&lt;/</g;
       
   111   	$visibility_problems{"$current_package\t???\t$symbol\timpacts $linktarget, $impacted"} = 1;
       
   112 		next;		
       
   113 		}
       
   114 
    80 	# &quot;J:/sf/app/commonemail/emailservices/emailclientapi/src/emailmailbox.cpp&quot;, line 49: Warning:  #830-D: function &quot;CBase::operator new(TUint, TLeave)&quot; has no corresponding operator delete (to be called if an exception is thrown during initialization of an allocated object)
   115 	# &quot;J:/sf/app/commonemail/emailservices/emailclientapi/src/emailmailbox.cpp&quot;, line 49: Warning:  #830-D: function &quot;CBase::operator new(TUint, TLeave)&quot; has no corresponding operator delete (to be called if an exception is thrown during initialization of an allocated object)
    81 	
   116 	
    82 	if ($line =~ /^&quot;(...*)&quot;, line (\d+): ([^:]+):\s+([^:]+): (.*)$/)
   117 	if ($line =~ /^("|&quot;)(...*)("|&quot;), line (\d+): ([^:]+):\s+([^:]+): (.*)$/)
    83 		{
   118 		{
    84 		my $filename = $1;
   119 		my $filename = $2;
    85 		my $lineno = $2;
   120 		my $lineno = $4;
    86 		my $messagetype = $3;
   121 		my $messagetype = $5;
    87 		my $message_id = $4;
   122 		my $message_id = $6;
    88 		my $message = $5;
   123 		my $message = $7;
    89 		
   124 		
    90 		if ($messagetype eq "Warning" && !$warnings)
   125 		if ($messagetype eq "Warning" && !$warnings)
    91 			{
   126 			{
    92 			next;		# ignore warnings
   127 			next;		# ignore warnings
    93 			}
   128 			}
   250 	printf "%-6d\t%s\n\t", $error_count_by_file{$file}, $file;
   285 	printf "%-6d\t%s\n\t", $error_count_by_file{$file}, $file;
   251 	print join("\n\t", @details);
   286 	print join("\n\t", @details);
   252 	print "\n";
   287 	print "\n";
   253 	}
   288 	}
   254 
   289 
       
   290 print "\n\n====Visibility problems\n";
       
   291 foreach my $problem ( sort keys %visibility_problems)
       
   292 	{
       
   293 	print "$problem\n";
       
   294 	}