Mercurial > octave
diff liboctave/util/lo-array-gripes.cc @ 21135:95da3bc8a281
supress deprecated function warnings in Octave code
* lo-array-gripes.cc, gripes.cc: Use GCC pragmas to suppress
deprecated function warnings.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 22 Jan 2016 13:45:21 -0500 |
parents | 7bb96a8df912 |
children | e06e600f396a |
line wrap: on
line diff
--- a/liboctave/util/lo-array-gripes.cc Fri Jan 22 12:15:12 2016 -0500 +++ b/liboctave/util/lo-array-gripes.cc Fri Jan 22 13:45:21 2016 -0500 @@ -147,7 +147,17 @@ { std::ostringstream buf; buf << n + 1; + +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + gripe_invalid_index (buf.str (), nd, dim, var); + +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic pop +#endif } void @@ -156,7 +166,17 @@ { std::ostringstream buf; buf << n + 1; + +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + gripe_invalid_index (buf.str (), nd, dim, var); + +#if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC) +#pragma GCC diagnostic pop +#endif }