diff --git a/src/libFLAC/metadata_iterators.c b/src/libFLAC/metadata_iterators.c index c29d96fd47..b13c8bd269 100644 --- a/src/libFLAC/metadata_iterators.c +++ b/src/libFLAC/metadata_iterators.c @@ -1478,7 +1478,7 @@ static FLAC__bool chain_rewrite_metadata_in_place_(FLAC__Metadata_Chain *chain) static FLAC__bool chain_rewrite_file_(FLAC__Metadata_Chain *chain, const char *tempfile_path_prefix, const char *filename) { FILE *f, *tempfile = NULL; - char *tempfilename; + char *tempfilename = 0; FLAC__Metadata_SimpleIteratorStatus status; const FLAC__Metadata_Node *node; diff --git a/src/test_libFLAC++/metadata_manip.cpp b/src/test_libFLAC++/metadata_manip.cpp index 39a066ec36..73f364965c 100644 --- a/src/test_libFLAC++/metadata_manip.cpp +++ b/src/test_libFLAC++/metadata_manip.cpp @@ -342,7 +342,7 @@ static bool write_chain_(FLAC::Metadata::Chain &chain, bool use_padding, bool pr if(to_different_file || chain.check_if_tempfile_needed(use_padding)) { struct flac_stat_s stats; - FILE *file, *tempfile; + FILE *file, *tempfile = 0; char *tempfilename; if(preserve_file_stats) { if(!get_file_stats_(filename, &stats))