diff options
author | Erich Eckner <git@eckner.net> | 2019-01-09 10:27:45 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-01-09 10:27:45 +0100 |
commit | 4d891ec9f23e1c900d6faf4e07948a7bba44232a (patch) | |
tree | 9668432b615703a3c76243c0c5eb7f96d161ed56 /conky-irc/fix-type-mismatch.patch | |
parent | bf90203df1ced234e725c6f2db3ccac2b4bfb9ff (diff) | |
download | archlinuxewe.git.save-4d891ec9f23e1c900d6faf4e07948a7bba44232a.tar.xz |
conky-irc: fix-type-mismatch.patch neu
Diffstat (limited to 'conky-irc/fix-type-mismatch.patch')
-rw-r--r-- | conky-irc/fix-type-mismatch.patch | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/conky-irc/fix-type-mismatch.patch b/conky-irc/fix-type-mismatch.patch new file mode 100644 index 00000000..a84d05e2 --- /dev/null +++ b/conky-irc/fix-type-mismatch.patch @@ -0,0 +1,13 @@ +diff --git a/src/linux.cc b/src/linux.cc +index 0a7d4331..09fa6c99 100644 +--- a/src/linux.cc ++++ b/src/linux.cc +@@ -1169,7 +1169,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 */ +- size_t len_to_trunc = std::max(7UL, strnlen(buf, 255)) - 7; ++ size_t len_to_trunc = std::max((size_t)7UL, strnlen(buf, 255)) - 7; + buf[len_to_trunc] = 0; + snprintf(path, 255, "%s%s/%s%d_input", dir, dev, type, n); + fd = open(path, O_RDONLY); |