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
@ -1215,9 +1215,9 @@ static int imap_store_msg(struct imap_store *ctx, struct strbuf *msg)
|
||||
static void wrap_in_html(struct strbuf *msg)
|
||||
{
|
||||
struct strbuf buf = STRBUF_INIT;
|
||||
static char *content_type = "Content-Type: text/html;\n";
|
||||
static char *pre_open = "<pre>\n";
|
||||
static char *pre_close = "</pre>\n";
|
||||
static const char *content_type = "Content-Type: text/html;\n";
|
||||
static const char *pre_open = "<pre>\n";
|
||||
static const char *pre_close = "</pre>\n";
|
||||
const char *body = strstr(msg->buf, "\n\n");
|
||||
|
||||
if (!body)
|
||||
|
Reference in New Issue
Block a user