Mercurial > hg > octave-nkf
changeset 19709:a5eb03a7e2a5
eliminate unused variable and parameter warnings
* audiodevinfo.cc, audioread.cc: Eliminate unused variable and
parameter warnings.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 02 Jan 2015 00:59:08 -0500 |
parents | 19f75d156ffe |
children | 4cb4210bd392 |
files | libinterp/dldfcn/audiodevinfo.cc libinterp/dldfcn/audioread.cc |
diffstat | 2 files changed, 30 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/dldfcn/audiodevinfo.cc +++ b/libinterp/dldfcn/audiodevinfo.cc @@ -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; }
--- a/libinterp/dldfcn/audioread.cc +++ b/libinterp/dldfcn/audioread.cc @@ -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", "");