summaryrefslogtreecommitdiff
path: root/colm
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2013-02-09 13:48:15 -0500
committerAdrian Thurston <thurston@complang.org>2013-02-09 13:48:15 -0500
commitfa4a8cddabbb7f3ef30b91b038cf97c3ab905026 (patch)
treeaa2aba8a9985bd80be179b4bd62b3d47599bf6f8 /colm
parent968a0f7831ed89030f8eabf842c7bc6270f7d81f (diff)
downloadcolm-fa4a8cddabbb7f3ef30b91b038cf97c3ab905026.tar.gz
check return value of write call, suppresses warning
Diffstat (limited to 'colm')
-rw-r--r--colm/tree.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/colm/tree.c b/colm/tree.c
index 767dc35d..341aad8d 100644
--- a/colm/tree.c
+++ b/colm/tree.c
@@ -2052,7 +2052,10 @@ void appendFile( struct ColmPrintArgs *args, const char *data, int length )
void appendFd( struct ColmPrintArgs *args, const char *data, int length )
{
- write( (long)args->arg, data, length );
+ int res = write( (long)args->arg, data, length );
+ if ( res != 0 ) {
+ message( "write error\n" );
+ }
}
Tree *treeTrim( struct ColmProgram *prg, Tree **sp, Tree *tree )