fix uninitialized variable error turned up by valgrind
authorJosh Coalson <jcoalson@users.sourceforce.net>
Wed, 14 Jul 2004 00:51:57 +0000 (00:51 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Wed, 14 Jul 2004 00:51:57 +0000 (00:51 +0000)
src/test_libFLAC++/encoders.cpp
src/test_libFLAC/encoders.c

index dfe60e0..370241d 100644 (file)
@@ -390,7 +390,7 @@ public:
 
 ::FLAC__SeekableStreamEncoderTellStatus SeekableStreamEncoder::tell_callback(FLAC__uint64 *absolute_byte_offset)
 {
-       (void)absolute_byte_offset;
+       *absolute_byte_offset = 0;
 
        return ::FLAC__SEEKABLE_STREAM_ENCODER_TELL_STATUS_OK;
 }
index 244b107..71b36e4 100644 (file)
@@ -424,7 +424,8 @@ FLAC__SeekableStreamEncoderSeekStatus seekable_stream_encoder_seek_callback_(con
 
 FLAC__SeekableStreamEncoderTellStatus seekable_stream_encoder_tell_callback_(const FLAC__SeekableStreamEncoder *encoder, FLAC__uint64 *absolute_byte_offset, void *client_data)
 {
-       (void)encoder, (void)absolute_byte_offset, (void)client_data;
+       (void)encoder, (void)client_data;
+       *absolute_byte_offset = 0;
        return FLAC__SEEKABLE_STREAM_ENCODER_TELL_STATUS_OK;
 }