git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "René Scharfe" <l.s.r@web.de>
To: Git Mailing List <git@vger.kernel.org>
Cc: Barret Rhoden <brho@google.com>, Junio C Hamano <gitster@pobox.com>
Subject: [PATCH] blame: provide type of fingerprints pointer
Date: Sun, 23 Feb 2020 17:56:31 +0100	[thread overview]
Message-ID: <22735441-50e1-5f00-ba12-539b3e9e4916@web.de> (raw)

The fingerprints member of struct blame_origin is a void pointer that is
only ever used to reference objects of type struct fingerprint.  Declare
its type to allow the compiler to do type checks.  We can keep its type
opaque in blame.h, though -- only functions in blame.c need to know the
actual definition of struct fingerprint.

Signed-off-by: René Scharfe <l.s.r@web.de>
---
 blame.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/blame.h b/blame.h
index 4a9e1270b0..089b181ff2 100644
--- a/blame.h
+++ b/blame.h
@@ -16,6 +16,8 @@
 #define BLAME_DEFAULT_MOVE_SCORE	20
 #define BLAME_DEFAULT_COPY_SCORE	40

+struct fingerprint;
+
 /*
  * One blob in a commit that is being suspected
  */
@@ -52,7 +54,7 @@ struct blame_origin {
 	struct blame_entry *suspects;
 	mmfile_t file;
 	int num_lines;
-	void *fingerprints;
+	struct fingerprint *fingerprints;
 	struct object_id blob_oid;
 	unsigned short mode;
 	/* guilty gets set when shipping any suspects to the final
--
2.25.1

             reply	other threads:[~2020-02-23 16:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-23 16:56 René Scharfe [this message]
2020-02-24 15:09 ` [PATCH] blame: provide type of fingerprints pointer Barret Rhoden

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=22735441-50e1-5f00-ba12-539b3e9e4916@web.de \
    --to=l.s.r@web.de \
    --cc=brho@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).