mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-11 08:08:06 -05: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 35fde00fd1fdc084a78dc3e4c3f94dbf16bbd236)
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…
x
Reference in New Issue
Block a user