Skip to content

Commit

Permalink
blame: provide type of fingerprints pointer
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
rscharfe authored and gitster committed Feb 24, 2020
1 parent b6d4d82 commit 27f182b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion blame.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 27f182b

Please sign in to comment.