From: Barret Rhoden <brho@google.com>
To: "René Scharfe" <l.s.r@web.de>, "Git Mailing List" <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] blame: provide type of fingerprints pointer
Date: Mon, 24 Feb 2020 10:09:45 -0500 [thread overview]
Message-ID: <ddaa7ab8-c07b-7718-815f-12ff048a89f7@google.com> (raw)
In-Reply-To: <22735441-50e1-5f00-ba12-539b3e9e4916@web.de>
On 2/23/20 11:56 AM, René Scharfe wrote:
> 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.
Reviewed-by: Barret Rhoden <brho@google.com>
Thanks.
>
> 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
>
prev parent reply other threads:[~2020-02-24 15:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-23 16:56 [PATCH] blame: provide type of fingerprints pointer René Scharfe
2020-02-24 15:09 ` Barret Rhoden [this message]
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=ddaa7ab8-c07b-7718-815f-12ff048a89f7@google.com \
--to=brho@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=l.s.r@web.de \
/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).