From a007ef1af0def1870e3af6ffed09aa67edb6b195 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Wed, 3 Jun 2015 11:22:09 +0200 Subject: Accumulate return value of write() to finally silence warnings --- src/export/split_version_2.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/export/split_version_2.c') diff --git a/src/export/split_version_2.c b/src/export/split_version_2.c index 6eafe55..c14da18 100644 --- a/src/export/split_version_2.c +++ b/src/export/split_version_2.c @@ -193,6 +193,7 @@ int main( int args, char **argv ) { char filename[1024]; MAP data, index; uint32_t * indoff; + ssize_t temp = 0; size_t limit; int i; @@ -237,17 +238,19 @@ int main( int args, char **argv ) { if( g_state.outfill[0] > limit ) for( i=0; i 1024*1024*6 ) printf( "Large: %zd\n", g_state.outfill[i] ); - (void)write( g_state.outfiles[i], g_state.outbuf[i], g_state.outfill[i] ); + temp += write( g_state.outfiles[i], g_state.outbuf[i], g_state.outfill[i] ); g_state.outfill[i] = 0; } } for( i=0; i