git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Ramsay Jones <ramsay@ramsayjones.plus.com>
To: Taylor Blau <me@ttaylorr.com>
Cc: GIT Mailing-list <git@vger.kernel.org>
Subject: static-check hits
Date: Sat, 4 Dec 2021 14:59:15 +0000	[thread overview]
Message-ID: <ec008905-5e04-944d-f164-d52a622f0531@ramsayjones.plus.com> (raw)

Hi Taylor,

Just a quick note about new hits from my 'static-check.pl' script
caused by the 'tb/cruft-packs' branch. This script notes any symbols
that are not referenced outside the defining compilation unit.
(So they could be declared static in that compilation unit).
Comparing the current 'next' and 'seen' branches:

  $ diff nsc ssc
  ...
  62a63,64
  > pack-mtimes.o	- pack_has_mtimes
  > packfile.o	- close_pack_mtimes
  ...
  $ 

This is not necessarily a problem, of course, if you have patches/plans
to add callers in the future (or that they simply 'round out' an API).
I haven't looked (so can't comment), beyond:

  $ git grep -n pack_has_mtimes
  pack-mtimes.c:14:int pack_has_mtimes(struct packed_git *p)
  pack-mtimes.h:11:int pack_has_mtimes(struct packed_git *p);
  $ git grep -n close_pack_mtimes
  packfile.c:336:void close_pack_mtimes(struct packed_git *p) {
  packfile.c:350: close_pack_mtimes(p);
  packfile.h:94:void close_pack_mtimes(struct packed_git *p);
  $ 

Note that 'pack_has_mtimes()' has no callers at all. Also, the function
definition of 'close_pack_mtimes()' has the opening { of the body
on the function header line, rather than by itself on the following line.

Just an FYI.

ATB,
Ramsay Jones



             reply	other threads:[~2021-12-04 14:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-04 14:59 Ramsay Jones [this message]
2021-12-04 22:47 ` static-check hits Taylor Blau

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ec008905-5e04-944d-f164-d52a622f0531@ramsayjones.plus.com \
    --to=ramsay@ramsayjones.plus.com \
    --cc=git@vger.kernel.org \
    --cc=me@ttaylorr.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).