Fixed two compiler warnings on arm platform

Sat, 20 Apr 2024 11:48:20 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sat, 20 Apr 2024 11:48:20 +0200
changeset 692
6d97eb820cc1
parent 691
cfe13185fd02
child 693
3518c07737d8

Fixed two compiler warnings on arm platform

thermferm/one-wire.c file | annotate | diff | comparison | revisions
thermferm/websocket.c file | annotate | diff | comparison | revisions
--- a/thermferm/one-wire.c	Sat Apr 20 11:34:00 2024 +0200
+++ b/thermferm/one-wire.c	Sat Apr 20 11:48:20 2024 +0200
@@ -159,7 +159,7 @@
 		pthread_mutex_unlock(&mutexes[LOCK_ONE_WIRE]);
 	    }
 	} else if (strcmp(w1type, (char *)"00")) {
-	    syslog(LOG_NOTICE, "One-wire device %ld %s unknown", strlen(buffer), buffer);
+	    syslog(LOG_NOTICE, "One-wire device %ld %s unknown", (long)strlen(buffer), buffer);
 	}
     }
     fclose(fp);
--- a/thermferm/websocket.c	Sat Apr 20 11:34:00 2024 +0200
+++ b/thermferm/websocket.c	Sat Apr 20 11:48:20 2024 +0200
@@ -347,7 +347,7 @@
 
 		memcpy(buf, in, len);
 		buf[len] = '\0';
-		syslog(LOG_NOTICE, "ws: received %ld bytes %s", len, buf);
+		syslog(LOG_NOTICE, "ws: received %ld bytes %s", (long)len, buf);
 		/*
 		 * These are send by bmsapp to bmsd. Then bmsd resends these via MQTT.
 		 * Do we want to change that? Or use it for the new web pages.

mercurial