# HG changeset patch # User John W. Eaton # Date 1420178348 18000 # Node ID a5eb03a7e2a5264ef1090983c0dedb0f357eddfb # Parent 19f75d156ffee3b54e9da944c2400e9d16fbe0d1 eliminate unused variable and parameter warnings * audiodevinfo.cc, audioread.cc: Eliminate unused variable and parameter warnings. diff -r 19f75d156ffe -r a5eb03a7e2a5 libinterp/dldfcn/audiodevinfo.cc --- a/libinterp/dldfcn/audiodevinfo.cc Fri Jan 02 00:47:25 2015 -0500 +++ b/libinterp/dldfcn/audiodevinfo.cc Fri Jan 02 00:59:08 2015 -0500 @@ -437,7 +437,7 @@ // Overloaded base functions double player_value (void) const { return 0; } - virtual double scalar_value (bool frc_str_conv = false) const { return 0; } + virtual double scalar_value (bool = false) const { return 0; } void print (std::ostream& os, bool pr_as_read_syntax = false) const; void print_raw (std::ostream& os, bool pr_as_read_syntax) const; @@ -519,11 +519,9 @@ } static int -octave_play_callback (const void *input, void *output, - unsigned long frames, - const PaStreamCallbackTimeInfo *time, - PaStreamCallbackFlags status, - void *data) +octave_play_callback (const void *, void *output, unsigned long frames, + const PaStreamCallbackTimeInfo *, + PaStreamCallbackFlags, void *data) { audioplayer *player = (audioplayer *)data; int big_endian = is_big_endian (); @@ -589,11 +587,9 @@ } static int -portaudio_play_callback (const void *input, void *output, - unsigned long frames, - const PaStreamCallbackTimeInfo* time, - PaStreamCallbackFlags status, - void *data) +portaudio_play_callback (const void *, void *output, unsigned long frames, + const PaStreamCallbackTimeInfo*, + PaStreamCallbackFlags, void *data) { audioplayer *player = (audioplayer *)data; int big_endian = is_big_endian (); @@ -686,7 +682,7 @@ } void -audioplayer::print_raw (std::ostream& os, bool pr_as_read_syntax) const +audioplayer::print_raw (std::ostream& os, bool) const { os << 0; } @@ -727,8 +723,13 @@ audioplayer::init (void) { PaError err; - int channels = this->y.rows (); - RowVector *sound_l = this->get_left (); + + // Both of these variables are unused. Should they be + // eliminated or is something not yet implemented? + // + // int channels = this->y.rows (); + // RowVector *sound_l = this->get_left (); + int device; err = Pa_Initialize (); @@ -1093,7 +1094,7 @@ // Overloaded base functions double player_value (void) const { return 0; } - virtual double scalar_value (bool frc_str_conv = false) const { return 0; } + virtual double scalar_value (bool = false) const { return 0; } void print (std::ostream& os, bool pr_as_read_syntax = false) const; void print_raw (std::ostream& os, bool pr_as_read_syntax) const; @@ -1160,11 +1161,9 @@ DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (audiorecorder, "audiorecorder", "audiorecorder"); static int -octave_record_callback (const void *input, void *output, - unsigned long frames, - const PaStreamCallbackTimeInfo* time, - PaStreamCallbackFlags status, - void *data) +octave_record_callback (const void *input, void *, unsigned long frames, + const PaStreamCallbackTimeInfo *, + PaStreamCallbackFlags, void *data) { audiorecorder *recorder = (audiorecorder *)data; int channels = recorder->get_channels (); @@ -1222,11 +1221,9 @@ } static int -portaudio_record_callback (const void *input, void *output, - unsigned long frames, - const PaStreamCallbackTimeInfo* time, - PaStreamCallbackFlags status, - void *data) +portaudio_record_callback (const void *input, void *, unsigned long frames, + const PaStreamCallbackTimeInfo *, + PaStreamCallbackFlags, void *data) { audiorecorder *recorder = (audiorecorder *)data; int channels = recorder->get_channels (); @@ -1302,7 +1299,7 @@ } void -audiorecorder::print_raw (std::ostream& os, bool pr_as_read_syntax) const +audiorecorder::print_raw (std::ostream& os, bool) const { os << 0; } diff -r 19f75d156ffe -r a5eb03a7e2a5 libinterp/dldfcn/audioread.cc --- a/libinterp/dldfcn/audioread.cc Fri Jan 02 00:47:25 2015 -0500 +++ b/libinterp/dldfcn/audioread.cc Fri Jan 02 00:59:08 2015 -0500 @@ -223,7 +223,9 @@ std::string title = ""; std::string artist = ""; std::string comment = ""; - float quality = 0.75; + // Quality is currently unused? + // + // float quality = 0.75; for (int i = 3; i < args.length (); i += 2) { if (args(i).string_value () == "BitsPerSample") @@ -242,8 +244,10 @@ } else if (args(i).string_value () == "BitRate") ; - else if (args(i).string_value () == "Quality") - quality = args(i + 1).int_value () * 0.01; + // Quality is currently unused? + // + // else if (args(i).string_value () == "Quality") + // quality = args(i + 1).int_value () * 0.01; else if (args(i).string_value () == "Title") title = args(i + 1).string_value (); else if (args(i).string_value () == "Artist") @@ -289,7 +293,6 @@ SNDFILE *file; SF_INFO info; info.format = 0; - int start, end; file = sf_open (args(0).string_value ().c_str (), SFM_READ, &info); retval.assign ("Filename", args(0).string_value ()); retval.assign ("CompressionMethod", "");