mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 01:02:24 +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!
This commit is contained in:
parent
71cf6454d5
commit
35fde00fd1
@ -104,7 +104,7 @@ void dputs(const 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