diff --git a/AUTHORS b/AUTHORS index 8c15b87f..391434ca 100644 --- a/AUTHORS +++ b/AUTHORS @@ -25,6 +25,7 @@ Jussi Knuuttila Kaito Udagawa Lei Xu Matt Clarkson +Maxim Vafin Nick Hutchinson Oleksandr Sochka Paul Redmond diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 96cd15a0..0f7f6ed1 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -41,6 +41,7 @@ Kaito Udagawa Kai Wolf Lei Xu Matt Clarkson +Maxim Vafin Nick Hutchinson Oleksandr Sochka Pascal Leroy diff --git a/src/sysinfo.cc b/src/sysinfo.cc index 34f9871c..7feb79e6 100644 --- a/src/sysinfo.cc +++ b/src/sysinfo.cc @@ -75,7 +75,9 @@ bool ReadIntFromFile(const char* file, long* value) { char line[1024]; char* err; memset(line, '\0', sizeof(line)); - CHECK(read(fd, line, sizeof(line) - 1)); + ssize_t read_err = read(fd, line, sizeof(line) - 1); + ((void)read_err); // prevent unused warning + CHECK(read_err >= 0); const long temp_value = strtol(line, &err, 10); if (line[0] != '\0' && (*err == '\n' || *err == '\0')) { *value = temp_value;