diff options
| author | Patrick Steinhardt <ps@pks.im> | 2024-06-07 08:37:39 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-06-07 10:30:48 -0700 |
| commit | b567004b4b43f9b0d88aa1f0b15698eae8f15836 (patch) | |
| tree | fc7b75831c1eb79a89c0196fbb78bd6b7d09d0b1 /imap-send.c | |
| parent | 5529cba09ff89b9762dbfd8f622e897948b60ab7 (diff) | |
| download | git-b567004b4b43f9b0d88aa1f0b15698eae8f15836.tar.gz | |
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>
Diffstat (limited to 'imap-send.c')
| -rw-r--r-- | imap-send.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/imap-send.c b/imap-send.c index a5d1510180..8b723b34a5 100644 --- a/imap-send.c +++ b/imap-send.c @@ -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) |
