mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Fix a compile warning with -DDEBUG.
An unguarded write() in the dputs function caused gcc -Werror to fail
to compile. I'm confused that this hasn't bitten me before, though -
obviously normal builds of PuTTY condition out the faulty code, but
_surely_ this can't be the first time I've enabled the developer
diagnostics since gcc started complaining about unchecked syscall
returns!
(cherry picked from commit 35fde00fd1
)
This commit is contained in:
parent
82814e18ec
commit
4322e7093e
@ -103,7 +103,7 @@ void dputs(char *buf)
|
||||
debug_fp = fopen("debug.log", "w");
|
||||
}
|
||||
|
||||
write(1, buf, strlen(buf));
|
||||
if (write(1, buf, strlen(buf)) < 0) {} /* 'error check' to placate gcc */
|
||||
|
||||
fputs(buf, debug_fp);
|
||||
fflush(debug_fp);
|
||||
|
Loading…
Reference in New Issue
Block a user