diff --git a/src/builder/b-ws-server.c b/src/builder/b-ws-server.c
index 31ef5ff..ca9fb4c 100644
--- a/src/builder/b-ws-server.c
+++ b/src/builder/b-ws-server.c
@@ -610,10 +610,15 @@ saib_m_state(void *userobj, void *sh, lws_ss_constate_t state,
memcpy((char *)spm->name, pq, (unsigned int)n);
((char *)spm->name)[n] = '\0';
- while (strchr(spm->name, '.'))
- *strchr(spm->name, '.') = '_';
- while (strchr(spm->name, '/'))
- *strchr(spm->name, '/') = '_';
+ {
+ char *p_name = (char *)spm->name;
+ char *p_found;
+
+ while ((p_found = strchr(p_name, '.')))
+ *p_found = '_';
+ while ((p_found = strchr(p_name, '/')))
+ *p_found = '_';
+ }
/* add us to the builder list of unique servers */
lws_dll2_add_head(&spm->list, &a->builder->sai_plat_server_owner);
diff --git a/src/device/d-sai.c b/src/device/d-sai.c
index ff7bec2..84ca2e9 100644
--- a/src/device/d-sai.c
+++ b/src/device/d-sai.c
@@ -213,7 +213,7 @@ said_check_device(lws_sorted_usec_list_t *sul)
lwsl_warn("%s: exporting %s = %s\n", __func__, p1, t->tty_path);
if (alias) {
- p1 = strchr(alias, '=');
+ p1 = strchr((char *)alias, '=');
if (p1 && atoi(&p1[1]) == try) {
*p1 = '\0';
setenv(alias, t->tty_path, 1);
diff --git a/src/power/p-tasmota-monitor.c b/src/power/p-tasmota-monitor.c
index e4036c2..d9e6453 100644
--- a/src/power/p-tasmota-monitor.c
+++ b/src/power/p-tasmota-monitor.c
@@ -58,7 +58,7 @@ saip_parse_tasmota_status(tasmota_parse_t *tp)
{
lws_tokenize_elem e;
unsigned int *i;
- char *p;
+ const char *p;
int n;
do {
diff --git a/src/server/s-notification.c b/src/server/s-notification.c
index c697b0e..69e4973 100644
--- a/src/server/s-notification.c
+++ b/src/server/s-notification.c
@@ -160,7 +160,7 @@ arg_to_bool(const char *s)
static int
sai_tuple_element_compare(const char *e1, const char *e2)
{
- char *p;
+ const char *p;
// lwsl_notice("%s: comp '%s' '%s'\n", __func__, e1, e2);