Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zero-initialize sfinfo in resample.c to fix Valgrind error #74

Merged
merged 2 commits into from
May 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const char *font_family = "DejaVu Sans Mono" ;
sf_count_t
sfx_mix_mono_read_double (SNDFILE * file, double * data, sf_count_t datalen)
{
SF_INFO info ;
SF_INFO info = {} ;

sf_command (file, SFC_GET_CURRENT_SF_INFO, &info, sizeof (info)) ;

Expand Down
2 changes: 1 addition & 1 deletion src/generate-chirp.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ generate_file (const char * filename, const PARAMS * params)
{
char buffer [1024] ;
SNDFILE * file ;
SF_INFO info ;
SF_INFO info = {} ;
double w0, w1 ;

memset (&info, 0, sizeof (info)) ;
Expand Down
2 changes: 1 addition & 1 deletion src/jackplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ int
main (int argc, char * argv [])
{ pthread_t thread_id ;
SNDFILE *sndfile ;
SF_INFO sfinfo ;
SF_INFO sfinfo = {} ;
const char * filename ;
jack_client_t *client ;
jack_status_t status = 0 ;
Expand Down
2 changes: 1 addition & 1 deletion src/mix-to-mono.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ int
main (int argc, char ** argv)
{
SNDFILE *infile, *outfile ;
SF_INFO sfinfo ;
SF_INFO sfinfo = {} ;

if (argc != 3)
usage_exit () ;
Expand Down
2 changes: 1 addition & 1 deletion src/resample.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static double apply_gain (float * data, long frames, int channels, double max, d
int
main (int argc, char *argv [])
{ SNDFILE *infile, *outfile = NULL ;
SF_INFO sfinfo ;
SF_INFO sfinfo = {} ;
sf_count_t nframes ;

int normalize = 1 ;
Expand Down
2 changes: 1 addition & 1 deletion src/spectrogram.c
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ static void
render_sndfile (RENDER * render)
{
SNDFILE *infile ;
SF_INFO info ;
SF_INFO info = {} ;

memset (&info, 0, sizeof (info)) ;

Expand Down
2 changes: 1 addition & 1 deletion src/waveform.c
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ static void
render_sndfile (RENDER * render)
{
SNDFILE *infile ;
SF_INFO info ;
SF_INFO info = {} ;
sf_count_t max_width ;

memset (&info, 0, sizeof (info)) ;
Expand Down