global: improve const correctness when assigning string constants
We're about to enable `-Wwrite-strings`, which changes the type of string constants to `const char[]`. Fix various sites where we assign such constants to non-const variables. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
5529cba09f
commit
b567004b4b
@ -36,7 +36,8 @@ static int test_entry_cmp(const void *cmp_data,
|
||||
}
|
||||
|
||||
static struct test_entry *alloc_test_entry(unsigned int hash,
|
||||
char *key, char *value)
|
||||
const char *key,
|
||||
const char *value)
|
||||
{
|
||||
size_t klen = strlen(key);
|
||||
size_t vlen = strlen(value);
|
||||
|
Reference in New Issue
Block a user