[systemd-devel] [PATCH 2/2] shared/utf8: mark char* as const
Dave Reisner
dreisner at archlinux.org
Fri Aug 10 08:02:04 PDT 2012
Avoids compiler warning:
src/shared/utf8.c: In function 'ascii_filter':
src/shared/utf8.c:278:16: warning: assignment discards 'const' qualifier
from pointer target type [enabled by default]
---
src/shared/utf8.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/shared/utf8.c b/src/shared/utf8.c
index ea7483f..5f9f3c6 100644
--- a/src/shared/utf8.c
+++ b/src/shared/utf8.c
@@ -265,7 +265,8 @@ char *ascii_is_valid(const char *str) {
}
char *ascii_filter(const char *str) {
- char *r, *s, *d;
+ const char *s;
+ char *r, *d;
size_t l;
assert(str);
--
1.7.11.4
More information about the systemd-devel
mailing list