summaryrefslogtreecommitdiff
path: root/extra/conky/fix-type-mismatch.patch
blob: 286fa107885bf3a0d4e3966596644f2a2ffe994c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
diff --git a/src/linux.cc b/src/linux.cc
index affa1de1..67d4662e 100644
--- a/src/linux.cc
+++ b/src/linux.cc
@@ -1171,7 +1171,7 @@ static int open_sysfs_sensor(const char *dir, const char *dev, const char *type,
   fd = open(path, O_RDONLY);
   if (fd < 0) {
     /* if it fails, strip the /device from dev and attempt again */
-    buf[std::max(0UL, strnlen(buf, 255) - 7)] = 0;
+    buf[std::max((size_t)0UL, strnlen(buf, 255) - 7)] = 0;
     snprintf(path, 255, "%s%s/%s%d_input", dir, dev, type, n);
     fd = open(path, O_RDONLY);
     if (fd < 0) {
diff --git a/src/mail.cc b/src/mail.cc
index 19dd1af8..fbcc4e2a 100644
--- a/src/mail.cc
+++ b/src/mail.cc
@@ -302,7 +302,7 @@ static void update_mail_count(struct local_mail_s *mail) {
     }
     closedir(dir);
 
-    dirname[std::max(0UL, strnlen(dirname, dirname_len - 1) - 3)] = '\0';
+    dirname[std::max((size_t)0UL, strnlen(dirname, dirname_len - 1) - 3)] = '\0';
     strcat(dirname, "new");
 
     dir = opendir(dirname);