I'm not a fan of this, adding double allocations just to fix an icc compiler warning. If you really want to fix this, I guess I would prefer something like:

```c
typedef struct {
    git_diff_similarity_metric metric;
    git_hashsig_option_t hashsig_option;
} hashsig_similarity_metric;

...

opts->metric = git__malloc(sizeof(hashsig_similarity_metric));
GITERR_CHECK_ALLOC(opts->metric);

opts->metric->payload = &((hashsign_similarity_metric *)opts->metric)->hashsig_option;

...

if (opts->flags & GIT_DIFF_FIND_IGNORE_WHITESPACE)
    *((git_hashsig_option_t *)opts->metric->payload) = GIT_HASHSIG_IGNORE_WHITESPACE;
...
```

Not sure why, but aesthetically that is more tolerable to me.

Also, btw, you don't need to cast the return value of `git__calloc` and `git__malloc` when assigning to a pointer since they are `void *` return values.