From: Junio C Hamano <gitster@pobox.com>
To: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Cc: GIT Mailing-list <git@vger.kernel.org>
Subject: Re: [PATCH 1/3] sparse: Fix some "symbol not declared" warnings
Date: Sun, 11 Sep 2011 14:38:10 -0700 [thread overview]
Message-ID: <7vobyqn4jh.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: 4E6D0E3F.3090304@ramsay1.demon.co.uk
There are many others that can be identified by running the attached
script after you build your git. I'll follow this message up with three
consolidated patches, but the latter two needs to be split into smaller
pieces to be either queued on top (for topics in next) or squashed into
(for topics in pu), which I am not going to do myself today (hint, hint).
#!/usr/bin/perl -w
my %defd = ();
my %used = ();
my %def_ok = map { $_ => 1 } qw(
main
alloc_report
have_git_dir
prepare_git_cmd
print_string_list
tm_to_time_t
unsorted_string_list_has_string
xdl_atol
xdl_cha_first
xdl_cha_next
xdl_mmfile_size
xdl_num_out
xdl_recs_cmp
);
for (<*.o>, <*/*.o>, <*/*/*.o>) {
my $obj = $_;
open(I, "-|", qw(nm -g), $obj) or die;
while (<I>) {
unless (/^[0-9a-f ]+([A-Z]) (\S*)$/) {
print STDERR "? $_";
next;
}
if (($1 eq "U") || $1 eq "C") {
$used{$2}++;
}
else {
push @{$defd{$obj}}, $2;
}
}
close I;
}
for my $obj (sort keys %defd) {
my $syms = $defd{$obj};
for my $sym (@$syms) {
next if exists $used{$sym} or exists $def_ok{$sym};
print "$obj - $sym\n";
}
}
next prev parent reply other threads:[~2011-09-11 21:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-11 19:38 [PATCH 1/3] sparse: Fix some "symbol not declared" warnings Ramsay Jones
2011-09-11 21:38 ` Junio C Hamano [this message]
2011-09-12 0:06 ` Junio C Hamano
2011-09-11 21:38 ` [PATCH 1/3] make-static: master Junio C Hamano
2011-09-12 6:14 ` Ramkumar Ramachandra
2011-09-15 4:29 ` Junio C Hamano
2011-09-13 22:51 ` Ramsay Jones
2011-09-13 23:46 ` Junio C Hamano
2011-09-14 6:50 ` Johannes Sixt
2011-09-14 19:03 ` Junio C Hamano
2011-09-14 20:33 ` Junio C Hamano
2011-09-14 8:52 ` Thomas Rast
2011-09-11 21:38 ` [PATCH 2/3] make-static: next Junio C Hamano
2011-09-11 21:38 ` [PATCH 3/3] make-static: pu Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vobyqn4jh.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=ramsay@ramsay1.demon.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).