diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 09:31:21 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 09:31:21 +0000 |
commit | 418b05fcd64815e6928cb9751285fa2d29a34361 (patch) | |
tree | 9c3aea706f65d3822c5fb4a526fd8570a7ded89d /testsuite/unzcrash.cc | |
parent | Adding upstream version 1.13~rc1. (diff) | |
download | lzip-418b05fcd64815e6928cb9751285fa2d29a34361.tar.xz lzip-418b05fcd64815e6928cb9751285fa2d29a34361.zip |
Adding upstream version 1.13~rc2.upstream/1.13_rc2
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'testsuite/unzcrash.cc')
-rw-r--r-- | testsuite/unzcrash.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/testsuite/unzcrash.cc b/testsuite/unzcrash.cc index b80580f..65d160d 100644 --- a/testsuite/unzcrash.cc +++ b/testsuite/unzcrash.cc @@ -106,7 +106,8 @@ void show_error( const char * const msg, const int errcode = 0, } -void internal_error( const char * const msg ) +void internal_error( const char * const msg ) throw() __attribute__ ((noreturn)); +void internal_error( const char * const msg ) throw() { if( verbosity >= 0 ) std::fprintf( stderr, "%s: internal error: %s.\n", program_name, msg ); @@ -340,7 +341,9 @@ int main( const int argc, const char * const argv[] ) if( !f ) { show_error( "Can't open pipe", errno ); return 1; } std::fwrite( buffer, 1, size, f ); - pclose( f ); + if( pclose( f ) == 0 && verbosity >= 0 ) + std::fprintf( stderr, "0x%02X (0x%02X+0x%02X) passed the test\n", + buffer[i], byte, j + 1 ); } } buffer[i] = byte; |