All,
When compiling Exim 4.91 on Ubuntu 16.04.5 LTS I get a gcc warning in
the USR1 signal handler:
gcc exim.c
exim.c: In function ‘usr1_handler’:
exim.c:242:1: warning: ignoring return value of ‘write’, declared with
attribute warn_unused_result [-Wunused-result]
(void)write(fd, process_info, process_info_len);
^
gcc expand.c
The following patch addresses the issue and should be safe for all
platforms:
root@relay1:~/exim-4.91/src# diff exim.c-orig exim.c
240c240,251
< if (fd < 0) return;
---
> //if (fd < 0) return;
> //
> //(void)write(fd, process_info, process_info_len);
> //(void)close(fd);
>
> if (fd > 0) {
> ssize_t x;
> int y;
>
> x = write(fd, process_info, process_info_len);
> y = close(fd);
> }
242,243d252
< (void)write(fd, process_info, process_info_len);
< (void)close(fd);
Regards
Mike Tubby MJT4-RIPE
--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/