mirror of
https://github.com/git/git.git
synced 2026-04-02 13:00:08 +02:00
Shut up GCC 4.4.0
GCC babbles something about "type-punned" pointers. Just add an extra layer of casting to avoid the warning. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
@@ -8,7 +8,8 @@
|
||||
|
||||
static unsigned int hash_obj(const struct object *obj, unsigned int n)
|
||||
{
|
||||
unsigned int hash = *(unsigned int *)obj->sha1;
|
||||
const void *p = obj->sha1;
|
||||
unsigned int hash = *(const unsigned int *)p;
|
||||
return hash % n;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user