[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1975-ge285bb2

Jelmer Vernooij jelmer at samba.org
Wed Jun 3 13:06:40 GMT 2009


The branch, master has been updated
       via  e285bb2da57d1da7b5f471399d34fa01dae187dd (commit)
      from  089ba385aff8ed3f53bb92464cc842c6c00a90f6 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit e285bb2da57d1da7b5f471399d34fa01dae187dd
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Jun 3 02:16:57 2009 +0200

    Move findstatic.pl script to top-level.

-----------------------------------------------------------------------

Summary of changes:
 {source3/script => script}/findstatic.pl |    0 
 source4/script/findstatic.pl             |   70 ------------------------------
 2 files changed, 0 insertions(+), 70 deletions(-)
 rename {source3/script => script}/findstatic.pl (100%)
 delete mode 100755 source4/script/findstatic.pl


Changeset truncated at 500 lines:

diff --git a/source3/script/findstatic.pl b/script/findstatic.pl
similarity index 100%
rename from source3/script/findstatic.pl
rename to script/findstatic.pl
diff --git a/source4/script/findstatic.pl b/source4/script/findstatic.pl
deleted file mode 100755
index 43a4916..0000000
--- a/source4/script/findstatic.pl
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/perl -w
-# find a list of fns and variables in the code that could be static
-# usually called with something like this:
-#    findstatic.pl `find . -name "*.o"`
-# Andrew Tridgell <tridge at samba.org>
-
-use strict;
-
-# use nm to find the symbols
-my($saved_delim) = $/;
-undef $/;
-my($syms) = `nm -o @ARGV`;
-$/ = $saved_delim;
-
-my(@lines) = split(/\n/s, $syms);
-
-my(%def);
-my(%undef);
-my(%stype);
-
-my(%typemap) = (
-	       "T" => "function",
-	       "C" => "uninitialised variable",
-	       "D" => "initialised variable"
-		);
-
-
-# parse the symbols into defined and undefined 
-for (my($i)=0; $i <= $#{@lines}; $i++) {
-	my($line) = $lines[$i];
-	if ($line =~ /(.*):[a-f0-9]* ([TCD]) (.*)/) {
-		my($fname) = $1;
-		my($symbol) = $3;
-		push(@{$def{$fname}}, $symbol);
-		$stype{$symbol} = $2;
-	}
-	if ($line =~ /(.*):\s* U (.*)/) {
-		my($fname) = $1;
-		my($symbol) = $2;
-		push(@{$undef{$fname}}, $symbol);
-	}
-}
-
-# look for defined symbols that are never referenced outside the place they 
-# are defined
-foreach my $f (keys %def) {
-	print "Checking $f\n";
-	my($found_one) = 0;
-	foreach my $s (@{$def{$f}}) {
-		my($found) = 0;
-		foreach my $f2 (keys %undef) {
-			if ($f2 ne $f) {
-				foreach my $s2 (@{$undef{$f2}}) {
-					if ($s2 eq $s) {
-						$found = 1;
-						$found_one = 1;
-					}
-				}
-			}
-		}
-		if ($found == 0) {
-			my($t) = $typemap{$stype{$s}};
-			print "  '$s' is unique to $f  ($t)\n";
-		}
-	}
-	if ($found_one == 0) {
-		print "  all symbols in '$f' are unused (main program?)\n";
-	}
-}
-


-- 
Samba Shared Repository


More information about the samba-cvs mailing list