git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/3] sparse: Fix some "symbol not declared" warnings

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 11, 2011, 21:38 UTC
Message-ID
<7vobyqn4jh.fsf@alter.siamese.dyndns.org>
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";
	}
}
Previous: Ramsay JonesNext: Junio C Hamano
Message 2 of 14 in “sparse: Fix some "symbol not declared" warnings”
  1. 1/3 sparse: Fix some "symbol not declared" warningsRamsay Jones, Sep 11, 2011
  2. Junio C HamanoSep 11, 2011
  3. Junio C HamanoSep 12, 2011
  4. 1/3 make-static: masterJunio C Hamano, Sep 11, 2011
  5. Ramkumar RamachandraSep 12, 2011
  6. Junio C HamanoSep 15, 2011
  7. Ramsay JonesSep 13, 2011
  8. Junio C HamanoSep 13, 2011
  9. Johannes SixtSep 14, 2011
  10. Junio C HamanoSep 14, 2011
  11. Junio C HamanoSep 14, 2011
  12. Thomas RastSep 14, 2011
  13. 2/3 make-static: nextJunio C Hamano, Sep 11, 2011
  14. 3/3 make-static: puJunio C Hamano, Sep 11, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.