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
@ -20,8 +20,8 @@ static struct reg_flag reg_flags[] = {
|
||||
|
||||
static int test_regex_bug(void)
|
||||
{
|
||||
char *pat = "[^={} \t]+";
|
||||
char *str = "={}\nfred";
|
||||
const char *pat = "[^={} \t]+";
|
||||
const char *str = "={}\nfred";
|
||||
regex_t r;
|
||||
regmatch_t m[1];
|
||||
|
||||
|
Reference in New Issue
Block a user