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
@ -753,7 +753,7 @@ static int bad_request(struct strbuf *hdr, const struct service_cmd *c)
|
||||
|
||||
int cmd_main(int argc UNUSED, const char **argv UNUSED)
|
||||
{
|
||||
char *method = getenv("REQUEST_METHOD");
|
||||
const char *method = getenv("REQUEST_METHOD");
|
||||
const char *proto_header;
|
||||
char *dir;
|
||||
struct service_cmd *cmd = NULL;
|
||||
|
||||
Reference in New Issue
Block a user