main: bytes (from write() when printing PID) *is* used

This commit is contained in:
Daniel Eklöf 2020-02-05 19:41:30 +01:00
parent d4755d94b0
commit 3f940ec2a8
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

2
main.c
View file

@ -157,7 +157,7 @@ print_pid(const char *pid_file, bool *unlink_at_exit)
char pid[32]; char pid[32];
snprintf(pid, sizeof(pid), "%u\n", getpid()); snprintf(pid, sizeof(pid), "%u\n", getpid());
ssize_t bytes __attribute((unused)) = write(pid_fd, pid, strlen(pid)); ssize_t bytes = write(pid_fd, pid, strlen(pid));
close(pid_fd); close(pid_fd);
if (bytes < 0) { if (bytes < 0) {