From 55b91e2a67bc8584a60b70c0a72f3174eefbd63d Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 31 Aug 2021 13:11:54 +0100 Subject: [PATCH] bind-mount: Be more const-correct When compiled with -Wwrite-strings as part of a larger project, gcc and clang both warn that we're assigning a string constant to a mutable struct member. There's actually no reason why it should be mutable, so make it const. Signed-off-by: Simon McVittie --- bind-mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bind-mount.c b/bind-mount.c index 808d5df..877b095 100644 --- a/bind-mount.c +++ b/bind-mount.c @@ -86,7 +86,7 @@ decode_mountoptions (const char *options) int i; unsigned long flags = 0; static const struct { int flag; - char *name; + const char *name; } flags_data[] = { { 0, "rw" }, { MS_RDONLY, "ro" },