Skip to content

Commit

Permalink
Prevent warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
gijsbers committed Jun 17, 2022
1 parent 5851153 commit 1d5b73c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/acpustatus.cc
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ class YTemp : private YTimerListener {
if (strlcat(path, "/temp", sizeof path) < sizeof path) {
int fd = open(path, O_RDONLY);
if (fd > 2) {
read(fd, buf, sizeof buf);
(void) read(fd, buf, sizeof buf);
close(fd);
}
}
Expand All @@ -413,7 +413,7 @@ class YTemp : private YTimerListener {
int fd = openat(dirfd, buf, O_RDONLY);
if (fd > 2) {
memset(buf, 0, sizeof buf);
read(fd, buf, sizeof buf - 1);
(void) read(fd, buf, sizeof buf - 1);
close(fd);
char* newl = strchr(buf, '\n');
if (newl) {
Expand Down
2 changes: 1 addition & 1 deletion src/fdomenu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ int main(int argc, char** argv) {
else if (*value == '$')
value = expand = dollar_expansion(value);
if (nonempty(value))
freopen(value, "w", stdout);
(void) freopen(value, "w", stdout);
if (expand)
delete[] expand;
}
Expand Down

0 comments on commit 1d5b73c

Please sign in to comment.