Mercurial > octave-antonio
diff libinterp/dldfcn/audiodevinfo.cc @ 19789:52e625f0e361
avoid signed/unsigned comparison warning from GCC
* audiodevinfo.cc (octave_play_callback): Use subtraction and
comparison to zero to avoid GCC warning about comparing signed and
unsigned values.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 20 Feb 2015 05:49:07 -0500 |
parents | 4197fc428c7d |
children | ca7599ae464d |
line wrap: on
line diff
--- a/libinterp/dldfcn/audiodevinfo.cc Fri Feb 20 04:36:39 2015 -0500 +++ b/libinterp/dldfcn/audiodevinfo.cc Fri Feb 20 05:49:07 2015 -0500 @@ -577,7 +577,7 @@ const Matrix sound = retval(0).matrix_value (); int return_status = retval(1).int_value (); - if (error_state || frames != sound.rows () + if (error_state || (frames - sound.rows () != 0) || sound.columns () < 1 || sound.columns () > 2) { error ("audio player callback function failed");