Skip to content

Commit

Permalink
removed compilation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ebertolazzi committed Jun 28, 2021
1 parent 3e755a4 commit c0be672
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 6 deletions.
12 changes: 12 additions & 0 deletions src/PolynomialRoots-1-Quadratic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,19 @@
| |
\*--------------------------------------------------------------------------*/

#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wunused-function"
#endif
#ifdef __clang__
#pragma clang diagnostic ignored "-Wglobal-constructors"
#pragma clang diagnostic ignored "-Wvla-extension"
#pragma clang diagnostic ignored "-Wvla"
#pragma clang diagnostic ignored "-Wunused-function"
#pragma clang diagnostic ignored "-Wdocumentation-unknown-command"
#endif

#include "PolynomialRoots.hh"

#include <cmath>
#include <iostream>
#include <algorithm>
Expand Down
12 changes: 12 additions & 0 deletions src/PolynomialRoots-2-Cubic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,19 @@
| |
\*--------------------------------------------------------------------------*/

#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wunused-function"
#endif
#ifdef __clang__
#pragma clang diagnostic ignored "-Wglobal-constructors"
#pragma clang diagnostic ignored "-Wvla-extension"
#pragma clang diagnostic ignored "-Wvla"
#pragma clang diagnostic ignored "-Wunused-function"
#pragma clang diagnostic ignored "-Wdocumentation-unknown-command"
#endif

#include "PolynomialRoots.hh"

#include <cmath>
#include <iostream>
#include <algorithm>
Expand Down
12 changes: 12 additions & 0 deletions src/PolynomialRoots-3-Quartic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,19 @@
| |
\*--------------------------------------------------------------------------*/

#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wunused-function"
#endif
#ifdef __clang__
#pragma clang diagnostic ignored "-Wglobal-constructors"
#pragma clang diagnostic ignored "-Wvla-extension"
#pragma clang diagnostic ignored "-Wvla"
#pragma clang diagnostic ignored "-Wunused-function"
#pragma clang diagnostic ignored "-Wdocumentation-unknown-command"
#endif

#include "PolynomialRoots.hh"

#include <cmath>
#include <iostream>
#include <algorithm>
Expand Down
5 changes: 3 additions & 2 deletions src/PolynomialRoots-Jenkins-Traub.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
//the console.
//

#include "PolynomialRoots.hh"

#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wunused-function"
#endif
Expand All @@ -40,8 +38,11 @@
#pragma clang diagnostic ignored "-Wvla-extension"
#pragma clang diagnostic ignored "-Wvla"
#pragma clang diagnostic ignored "-Wunused-function"
#pragma clang diagnostic ignored "-Wdocumentation-unknown-command"
#endif

#include "PolynomialRoots.hh"

#include <iostream>
#include <fstream>
#include <cctype>
Expand Down
11 changes: 8 additions & 3 deletions src/PolynomialRoots-Utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,20 @@
| |
\*--------------------------------------------------------------------------*/

#include "PolynomialRoots.hh"
#include "PolynomialRoots-Utils.hh"

#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wunused-function"
#endif
#ifdef __clang__
#pragma clang diagnostic ignored "-Wglobal-constructors"
#pragma clang diagnostic ignored "-Wvla-extension"
#pragma clang diagnostic ignored "-Wvla"
#pragma clang diagnostic ignored "-Wunused-function"
#pragma clang diagnostic ignored "-Wdocumentation-unknown-command"
#endif

#include "PolynomialRoots.hh"
#include "PolynomialRoots-Utils.hh"

#ifndef DOXYGEN_SHOULD_SKIP_THIS

namespace PolynomialRoots {
Expand Down
13 changes: 12 additions & 1 deletion src_tests/check_1_quadratic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
.. the cubic and quartic solvers as described in the manuscript.
*/

#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wunused-function"
#endif
#ifdef __clang__
#pragma clang diagnostic ignored "-Wglobal-constructors"
#pragma clang diagnostic ignored "-Wvla-extension"
#pragma clang diagnostic ignored "-Wvla"
#pragma clang diagnostic ignored "-Wunused-function"
#pragma clang diagnostic ignored "-Wdocumentation-unknown-command"
#endif

#include "PolynomialRoots.hh"
#include <iostream>
#include <iomanip>
Expand Down Expand Up @@ -48,7 +59,7 @@ do_test( double const p[3] ) {
int
main() {
cout.precision(20);
for ( int k = 0; k < sizeof(qq)/sizeof(qq[0]); ++k ) {
for ( unsigned k = 0; k < unsigned(sizeof(qq)/sizeof(qq[0])); ++k ) {
cout << "\n\nExample N." << k << '\n';
do_test(qq[k]);
}
Expand Down
14 changes: 14 additions & 0 deletions src_tests/check_2_cubic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,22 @@
.. for Physical Applications
.. ACM TOMS, Vol. 41, No. 4, 2015.
.. DOI: http://dx.doi.org/10.1145/2699468
..
.. Added other 5 cubic polinoamials
..
*/

#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wunused-function"
#endif
#ifdef __clang__
#pragma clang diagnostic ignored "-Wglobal-constructors"
#pragma clang diagnostic ignored "-Wvla-extension"
#pragma clang diagnostic ignored "-Wvla"
#pragma clang diagnostic ignored "-Wunused-function"
#pragma clang diagnostic ignored "-Wdocumentation-unknown-command"
#endif

#include "PolynomialRoots.hh"
#include <iostream>
#include <iomanip>
Expand Down
11 changes: 11 additions & 0 deletions src_tests/check_3_quartic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
.. the cubic and quartic solvers as described in the manuscript.
*/

#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wunused-function"
#endif
#ifdef __clang__
#pragma clang diagnostic ignored "-Wglobal-constructors"
#pragma clang diagnostic ignored "-Wvla-extension"
#pragma clang diagnostic ignored "-Wvla"
#pragma clang diagnostic ignored "-Wunused-function"
#pragma clang diagnostic ignored "-Wdocumentation-unknown-command"
#endif

#include "PolynomialRoots.hh"
#include <iostream>
#include <iomanip>
Expand Down

0 comments on commit c0be672

Please sign in to comment.