Fixes -Wcast-qual warnings. Signed-off-by: Daniel Lenski <dlenski at gmail.com> --- auth-common.c | 2 +- http.c | 2 +- openconnect-internal.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/auth-common.c b/auth-common.c index 848f882..c094304 100644 --- a/auth-common.c +++ b/auth-common.c @@ -62,7 +62,7 @@ int xmlnode_match_prop(xmlNode *xml_node, const char *name, const char *match) return ret; } -int append_opt(struct oc_text_buf *body, char *opt, char *name) +int append_opt(struct oc_text_buf *body, const char *opt, const char *name) { if (buf_error(body)) return buf_error(body); diff --git a/http.c b/http.c index 18d7da2..1b99319 100644 --- a/http.c +++ b/http.c @@ -41,7 +41,7 @@ struct oc_text_buf *buf_alloc(void) return calloc(1, sizeof(struct oc_text_buf)); } -void buf_append_urlencoded(struct oc_text_buf *buf, char *str) +void buf_append_urlencoded(struct oc_text_buf *buf, const char *str) { while (str && *str) { unsigned char c = *str; diff --git a/openconnect-internal.h b/openconnect-internal.h index e44a549..c8612dd 100644 --- a/openconnect-internal.h +++ b/openconnect-internal.h @@ -972,7 +972,7 @@ int cstp_obtain_cookie(struct openconnect_info *vpninfo); int xmlnode_is_named(xmlNode *xml_node, const char *name); int xmlnode_get_prop(xmlNode *xml_node, const char *name, char **var); int xmlnode_match_prop(xmlNode *xml_node, const char *name, const char *match); -int append_opt(struct oc_text_buf *body, char *opt, char *name); +int append_opt(struct oc_text_buf *body, const char *opt, const char *name); int append_form_opts(struct openconnect_info *vpninfo, struct oc_auth_form *form, struct oc_text_buf *body); void free_opt(struct oc_form_opt *opt); @@ -994,7 +994,7 @@ int buf_append_utf16le(struct oc_text_buf *buf, const char *utf8); int get_utf8char(const char **utf8); void buf_append_from_utf16le(struct oc_text_buf *buf, const void *utf16); void buf_truncate(struct oc_text_buf *buf); -void buf_append_urlencoded(struct oc_text_buf *buf, char *str); +void buf_append_urlencoded(struct oc_text_buf *buf, const char *str); int buf_error(struct oc_text_buf *buf); int buf_free(struct oc_text_buf *buf); char *openconnect_create_useragent(const char *base); -- 2.7.4