vysheng / tg

telegram-cli
GNU General Public License v2.0
6.45k stars 1.53k forks source link

termination_signal_handler in make #1786

Open PythonOrC opened 1 year ago

PythonOrC commented 1 year ago
main.c: In function 'termination_signal_handler':
main.c:824:7: warning: 'write' reading 18 bytes from a region of size 17 [-Wstringop-overread]
  824 |   if (write (1, "SIGNAL received\n", 18) < 0) {
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from main.c:29:
/usr/include/unistd.h:378:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  378 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
main.c:824:7: warning: 'write' reading 18 bytes from a region of size 17 [-Wstringop-overread]
  824 |   if (write (1, "SIGNAL received\n", 18) < 0) {
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/unistd.h:378:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  378 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
aygupt1822 commented 1 year ago

I am having the same problem, as you described.

Screenshot from 2023-06-06 19-09-42

hg42 commented 1 year ago

see #1794 (or #1766 if someone thinks that's correct)