]> git.ipfire.org Git - thirdparty/git.git/commitdiff
blame: provide type of fingerprints pointer
authorRené Scharfe <l.s.r@web.de>
Sun, 23 Feb 2020 16:56:31 +0000 (17:56 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 24 Feb 2020 20:08:48 +0000 (12:08 -0800)
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>
Reviewed-by: Barret Rhoden <brho@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
blame.h

diff --git a/blame.h b/blame.h
index 4a9e1270b036465c23fab5a0e536b9638ca3ce1b..089b181ff27b8c90315ef264e038227cb24c7f86 100644 (file)
--- 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