Skip to content

Commit 27f182b

Browse files
rscharfegitster
authored andcommitted
blame: provide type of fingerprints pointer
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 <[email protected]> Reviewed-by: Barret Rhoden <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b6d4d82 commit 27f182b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

blame.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
#define BLAME_DEFAULT_MOVE_SCORE 20
1717
#define BLAME_DEFAULT_COPY_SCORE 40
1818

19+
struct fingerprint;
20+
1921
/*
2022
* One blob in a commit that is being suspected
2123
*/
@@ -52,7 +54,7 @@ struct blame_origin {
5254
struct blame_entry *suspects;
5355
mmfile_t file;
5456
int num_lines;
55-
void *fingerprints;
57+
struct fingerprint *fingerprints;
5658
struct object_id blob_oid;
5759
unsigned short mode;
5860
/* guilty gets set when shipping any suspects to the final

0 commit comments

Comments
 (0)