diff --git a/configure.ac b/configure.ac index d113e888d..fcabd1fb3 100644 --- a/configure.ac +++ b/configure.ac @@ -87,8 +87,7 @@ AS_IF([test "x$enable_compile_warnings" != "xno"], AS_IF([test "x$enable_compile_warnings" != "xno"], [ax_enable_compile_warnings=yes AX_COMPILER_FLAGS_CFLAGS([WARNING_CFLAGS], [], [ dnl - -pedantic dnl - -Wold-style-cast]) + -pedantic dnl]) AC_SUBST([WARNING_CFLAGS])]) # Check for system planarity suite diff --git a/extern/bliss-0.73/bliss_C.cc b/extern/bliss-0.73/bliss_C.cc index 283bbbf5e..7652d5354 100644 --- a/extern/bliss-0.73/bliss_C.cc +++ b/extern/bliss-0.73/bliss_C.cc @@ -29,6 +29,11 @@ extern "C" { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wold-style-cast" #pragma clang diagnostic ignored "-Wsign-compare" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wold-style-cast" +#pragma GCC diagnostic ignored "-Wsign-compare" +#pragma GCC diagnostic ignored "-Wmissing-declarations" #endif struct bliss_digraphs_graph_struct { @@ -238,4 +243,6 @@ void bliss_digraphs_free_blissstats(BlissStats *stats) #if defined(__clang__) #pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop #endif diff --git a/extern/bliss-0.73/defs.cc b/extern/bliss-0.73/defs.cc index 86ccc63f6..d14315018 100644 --- a/extern/bliss-0.73/defs.cc +++ b/extern/bliss-0.73/defs.cc @@ -25,6 +25,11 @@ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wformat-nonliteral" #pragma clang diagnostic ignored "-Wmissing-noreturn" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-nonliteral" +#pragma GCC diagnostic ignored "-Wmissing-noreturn" +#pragma GCC diagnostic ignored "-Wsuggest-attribute=format" #endif namespace bliss_digraphs { @@ -42,4 +47,6 @@ namespace bliss_digraphs { #if defined(__clang__) #pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop #endif diff --git a/extern/bliss-0.73/graph.cc b/extern/bliss-0.73/graph.cc index f1f12724c..56f6ef503 100755 --- a/extern/bliss-0.73/graph.cc +++ b/extern/bliss-0.73/graph.cc @@ -33,6 +33,9 @@ #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wold-style-cast" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wold-style-cast" #endif namespace bliss_digraphs { diff --git a/extern/bliss-0.73/timer.cc b/extern/bliss-0.73/timer.cc index d69366fdd..a3cd06e91 100644 --- a/extern/bliss-0.73/timer.cc +++ b/extern/bliss-0.73/timer.cc @@ -24,6 +24,10 @@ #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wold-style-cast" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wold-style-cast" +#pragma GCC diagnostic ignored "-Wuninitialized" #endif namespace bliss_digraphs { @@ -60,4 +64,6 @@ double Timer::get_duration() } // namespace bliss_digraphs #if defined(__clang__) #pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop #endif diff --git a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphDFSUtils.c b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphDFSUtils.c index 9ac87b027..91e45d90d 100644 --- a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphDFSUtils.c +++ b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphDFSUtils.c @@ -31,6 +31,10 @@ extern void _ClearVertexVisitedFlags(graphP theGraph, int); #pragma clang diagnostic ignored "-Wstrict-prototypes" #pragma clang diagnostic ignored "-Wmissing-prototypes" #pragma clang diagnostic ignored "-Wdeprecated-non-prototype" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-prototypes" +#pragma GCC diagnostic ignored "-Wmissing-prototypes" #endif int gp_CreateDFSTree(graphP theGraph) @@ -459,4 +463,6 @@ printf("LeastAncestor in %.3lf seconds.\n", platform_GetDuration(start,end)); } #if defined(__clang__) #pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop #endif diff --git a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphDrawPlanar.c b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphDrawPlanar.c index 1b107b04a..a63df776e 100644 --- a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphDrawPlanar.c +++ b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphDrawPlanar.c @@ -9,6 +9,10 @@ See the LICENSE.TXT file for licensing information. #pragma clang diagnostic ignored "-Wstrict-prototypes" #pragma clang diagnostic ignored "-Wmissing-prototypes" #pragma clang diagnostic ignored "-Wdeprecated-non-prototype" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-prototypes" +#pragma GCC diagnostic ignored "-Wmissing-prototypes" #endif #include "graphDrawPlanar.h" @@ -1047,4 +1051,6 @@ int v, e, eTwin, EsizeOccupied, epos, eposIndex; } #if defined(__clang__) #pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop #endif diff --git a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphDrawPlanar_Extensions.c b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphDrawPlanar_Extensions.c index c8b796689..3cb27b1b2 100644 --- a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphDrawPlanar_Extensions.c +++ b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphDrawPlanar_Extensions.c @@ -3,20 +3,22 @@ Copyright (c) 1997-2020, John M. Boyer All rights reserved. See the LICENSE.TXT file for licensing information. */ - -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wstrict-prototypes" -#pragma clang diagnostic ignored "-Wmissing-prototypes" -#pragma clang diagnostic ignored "-Wdeprecated-non-prototype" -#endif + +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wstrict-prototypes" +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wdeprecated-non-prototype" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-prototypes" +#pragma GCC diagnostic ignored "-Wmissing-prototypes" +#endif #include #include "graphDrawPlanar.private.h" #include "graphDrawPlanar.h" - - extern void _ClearVertexVisitedFlags(graphP theGraph, int); @@ -59,7 +61,7 @@ void _DrawPlanar_FreeContext(void *); /**************************************************************************** * DRAWPLANAR_ID - the variable used to hold the integer identifier for this * extension, enabling this feature's extension context to be distinguished - * from other features' extension contexts that may be attached to a graph. + * from other features' extension contexts that may be attached to a graph. ****************************************************************************/ int DRAWPLANAR_ID = 0; @@ -687,6 +689,8 @@ int _DrawPlanar_WritePostprocess(graphP theGraph, void **pExtraData, long *pExt return NOTOK; } -#if defined(__clang__) -#pragma clang diagnostic pop -#endif +#if defined(__clang__) +#pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#endif diff --git a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphEmbed.c b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphEmbed.c index a0d2ec7f1..81f3ec48d 100644 --- a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphEmbed.c +++ b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphEmbed.c @@ -13,6 +13,10 @@ See the LICENSE.TXT file for licensing information. #pragma clang diagnostic ignored "-Wstrict-prototypes" #pragma clang diagnostic ignored "-Wmissing-prototypes" #pragma clang diagnostic ignored "-Wdeprecated-non-prototype" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-prototypes" +#pragma GCC diagnostic ignored "-Wmissing-prototypes" #endif /* Imported functions */ @@ -1369,4 +1373,6 @@ int e_u, e_v, e_ulink, e_vlink; #if defined(__clang__) #pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop #endif diff --git a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphExtensions.c b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphExtensions.c index 1d46eba11..199603bd8 100644 --- a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphExtensions.c +++ b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphExtensions.c @@ -13,6 +13,13 @@ See the LICENSE.TXT file for licensing information. #include "graphExtensions.h" #include "graphFunctionTable.h" +#ifdef __GNUC__ + #ifndef __clang__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wshadow" + #endif +#endif + /* Imported functions */ extern void _InitFunctionTable(graphP theGraph); @@ -30,7 +37,7 @@ graphExtensionP _FindNearestOverload(graphP theGraph, graphExtensionP target, in * An ID identifies an extension, which may be added to multiple * graphs. It is used in lieu of identifying extensions by a string * name, which is noticeably expensive when a frequently called - * overload function seeks the extension context for a graph. + * overload function seeks the extension context for a graph. ********************************************************************/ static int moduleIDGenerator = 0; @@ -544,3 +551,9 @@ void _FreeExtension(graphExtensionP extension) } free(extension); } + +#ifdef __GNUC__ + #ifndef __clang__ + #pragma GCC diagnostic pop + #endif +#endif \ No newline at end of file diff --git a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphFunctionTable.h b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphFunctionTable.h index 46fc6cb31..24cbef0b4 100644 --- a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphFunctionTable.h +++ b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphFunctionTable.h @@ -21,6 +21,10 @@ extern "C" { #pragma clang diagnostic ignored "-Wstrict-prototypes" #pragma clang diagnostic ignored "-Wmissing-prototypes" #pragma clang diagnostic ignored "-Wdeprecated-non-prototype" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-prototypes" +#pragma GCC diagnostic ignored "-Wmissing-prototypes" #endif typedef struct @@ -65,6 +69,8 @@ typedef graphFunctionTable * graphFunctionTableP; #if defined(__clang__) #pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop #endif #ifdef __cplusplus diff --git a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphIO.c b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphIO.c index f268ab65b..9b805ed3d 100644 --- a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphIO.c +++ b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphIO.c @@ -10,6 +10,13 @@ See the LICENSE.TXT file for licensing information. #pragma clang diagnostic ignored "-Wdeprecated-non-prototype" #pragma clang diagnostic ignored "-Wincompatible-pointer-types-discards-qualifiers" #pragma clang diagnostic ignored "-Wformat-nonliteral" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-prototypes" +#pragma GCC diagnostic ignored "-Wmissing-prototypes" +#pragma GCC diagnostic ignored "-Wdiscarded-qualifiers" +#pragma GCC diagnostic ignored "-Wformat-nonliteral" +#pragma GCC diagnostic ignored "-Wunused-result" #endif #include @@ -762,4 +769,6 @@ char *_MakeLogStr5(char *format, int one, int two, int three, int four, int five } #if defined(__clang__) #pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop #endif diff --git a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphIsolator.c b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphIsolator.c index e85317c6f..5f5b0560a 100644 --- a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphIsolator.c +++ b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphIsolator.c @@ -9,6 +9,10 @@ See the LICENSE.TXT file for licensing information. #pragma clang diagnostic ignored "-Wstrict-prototypes" #pragma clang diagnostic ignored "-Wmissing-prototypes" #pragma clang diagnostic ignored "-Wdeprecated-non-prototype" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-prototypes" +#pragma GCC diagnostic ignored "-Wmissing-prototypes" #endif #define GRAPHISOLATOR_C @@ -831,4 +835,6 @@ int _DeleteUnmarkedVerticesAndEdges(graphP theGraph) } #if defined(__clang__) #pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop #endif diff --git a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphK23Search.c b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphK23Search.c index 320226879..dd3ecd0d3 100644 --- a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphK23Search.c +++ b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphK23Search.c @@ -9,6 +9,10 @@ See the LICENSE.TXT file for licensing information. #pragma clang diagnostic ignored "-Wstrict-prototypes" #pragma clang diagnostic ignored "-Wmissing-prototypes" #pragma clang diagnostic ignored "-Wdeprecated-non-prototype" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-prototypes" +#pragma GCC diagnostic ignored "-Wmissing-prototypes" #endif #include "graph.h" @@ -271,4 +275,6 @@ int u, d, XorY; } #if defined(__clang__) #pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop #endif diff --git a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphK23Search_Extensions.c b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphK23Search_Extensions.c index 9384b1bce..5a7c246b6 100644 --- a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphK23Search_Extensions.c +++ b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphK23Search_Extensions.c @@ -9,6 +9,10 @@ See the LICENSE.TXT file for licensing information. #pragma clang diagnostic ignored "-Wstrict-prototypes" #pragma clang diagnostic ignored "-Wmissing-prototypes" #pragma clang diagnostic ignored "-Wdeprecated-non-prototype" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-prototypes" +#pragma GCC diagnostic ignored "-Wmissing-prototypes" #endif #include @@ -255,4 +259,6 @@ int _K23Search_CheckObstructionIntegrity(graphP theGraph, graphP origGraph) } #if defined(__clang__) #pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop #endif diff --git a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphK33Search.c b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphK33Search.c index 78c2f64cc..cd8133c6e 100644 --- a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphK33Search.c +++ b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphK33Search.c @@ -9,6 +9,10 @@ See the LICENSE.TXT file for licensing information. #pragma clang diagnostic ignored "-Wstrict-prototypes" #pragma clang diagnostic ignored "-Wmissing-prototypes" #pragma clang diagnostic ignored "-Wdeprecated-non-prototype" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-prototypes" +#pragma GCC diagnostic ignored "-Wmissing-prototypes" #endif #include "graphK33Search.h" @@ -2055,4 +2059,6 @@ int u_min, u_max, d, u_d; } #if defined(__clang__) #pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop #endif diff --git a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphK33Search_Extensions.c b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphK33Search_Extensions.c index fee63863e..60d14ed73 100644 --- a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphK33Search_Extensions.c +++ b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphK33Search_Extensions.c @@ -9,6 +9,10 @@ See the LICENSE.TXT file for licensing information. #pragma clang diagnostic ignored "-Wstrict-prototypes" #pragma clang diagnostic ignored "-Wmissing-prototypes" #pragma clang diagnostic ignored "-Wdeprecated-non-prototype" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-prototypes" +#pragma GCC diagnostic ignored "-Wmissing-prototypes" #endif #include diff --git a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphK4Search.c b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphK4Search.c index fba6729f9..5179df39b 100644 --- a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphK4Search.c +++ b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphK4Search.c @@ -9,6 +9,10 @@ See the LICENSE.TXT file for licensing information. #pragma clang diagnostic ignored "-Wstrict-prototypes" #pragma clang diagnostic ignored "-Wmissing-prototypes" #pragma clang diagnostic ignored "-Wdeprecated-non-prototype" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-prototypes" +#pragma GCC diagnostic ignored "-Wmissing-prototypes" #endif #include "graphK4Search.h" #include "graphK4Search.private.h" @@ -1481,4 +1485,6 @@ int _K4_RestoreAndOrientReducedPaths(graphP theGraph, K4SearchContext *context) } #if defined(__clang__) #pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop #endif diff --git a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphK4Search_Extensions.c b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphK4Search_Extensions.c index 046fa63f6..9338beb63 100644 --- a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphK4Search_Extensions.c +++ b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphK4Search_Extensions.c @@ -9,6 +9,10 @@ See the LICENSE.TXT file for licensing information. #pragma clang diagnostic ignored "-Wstrict-prototypes" #pragma clang diagnostic ignored "-Wmissing-prototypes" #pragma clang diagnostic ignored "-Wdeprecated-non-prototype" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-prototypes" +#pragma GCC diagnostic ignored "-Wmissing-prototypes" #endif #include @@ -502,4 +506,6 @@ int _K4Search_CheckObstructionIntegrity(graphP theGraph, graphP origGraph) #if defined(__clang__) #pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop #endif diff --git a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphOuterplanarObstruction.c b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphOuterplanarObstruction.c index 848106457..9839059b0 100644 --- a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphOuterplanarObstruction.c +++ b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphOuterplanarObstruction.c @@ -11,6 +11,10 @@ See the LICENSE.TXT file for licensing information. #pragma clang diagnostic ignored "-Wstrict-prototypes" #pragma clang diagnostic ignored "-Wmissing-prototypes" #pragma clang diagnostic ignored "-Wdeprecated-non-prototype" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-prototypes" +#pragma GCC diagnostic ignored "-Wmissing-prototypes" #endif /* Imported functions */ @@ -203,4 +207,6 @@ isolatorContextP IC = &theGraph->IC; } #if defined(__clang__) #pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop #endif diff --git a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphTests.c b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphTests.c index c9124cc03..c8fe95d3c 100644 --- a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphTests.c +++ b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphTests.c @@ -9,6 +9,10 @@ See the LICENSE.TXT file for licensing information. #pragma clang diagnostic ignored "-Wstrict-prototypes" #pragma clang diagnostic ignored "-Wmissing-prototypes" #pragma clang diagnostic ignored "-Wdeprecated-non-prototype" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-prototypes" +#pragma GCC diagnostic ignored "-Wmissing-prototypes" #endif #define GRAPHTEST_C diff --git a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphUtils.c b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphUtils.c index 5bb906dd3..1cc18bce7 100644 --- a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphUtils.c +++ b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/graphUtils.c @@ -9,6 +9,11 @@ See the LICENSE.TXT file for licensing information. #pragma clang diagnostic ignored "-Wstrict-prototypes" #pragma clang diagnostic ignored "-Wmissing-prototypes" #pragma clang diagnostic ignored "-Wdeprecated-non-prototype" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-prototypes" +#pragma GCC diagnostic ignored "-Wmissing-prototypes" +#pragma GCC diagnostic ignored "-Wold-style-definition" #endif #include @@ -2501,4 +2506,6 @@ int debugNOTOK() } #if defined(__clang__) #pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop #endif diff --git a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/planarity.h b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/planarity.h index 7f2ad40a5..4b305d296 100644 --- a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/planarity.h +++ b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/planarity.h @@ -6,6 +6,10 @@ #pragma clang diagnostic ignored "-Wstrict-prototypes" #pragma clang diagnostic ignored "-Wmissing-prototypes" #pragma clang diagnostic ignored "-Wdeprecated-non-prototype" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-prototypes" +#pragma GCC diagnostic ignored "-Wmissing-prototypes" #endif /* Copyright (c) 1997-2020, John M. Boyer diff --git a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/planarityRandomGraphs.c b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/planarityRandomGraphs.c index adf2b1e6c..fb96b59a4 100644 --- a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/planarityRandomGraphs.c +++ b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/planarityRandomGraphs.c @@ -11,6 +11,13 @@ See the LICENSE.TXT file for licensing information. #pragma clang diagnostic ignored "-Wdeprecated-non-prototype" #pragma clang diagnostic ignored \ "-Wincompatible-pointer-types-discards-qualifiers" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-prototypes" +#pragma GCC diagnostic ignored "-Wmissing-prototypes" +#pragma GCC diagnostic ignored "-Wdiscarded-qualifiers" +#pragma GCC diagnostic ignored "-Wswitch-default" +#pragma GCC diagnostic ignored "-Wunused-result" #endif #include "planarity.h" @@ -488,4 +495,6 @@ int RandomGraph(char command, } #if defined(__clang__) #pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop #endif diff --git a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/planaritySpecificGraph.c b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/planaritySpecificGraph.c index c6089ddeb..cc9cf2f73 100644 --- a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/planaritySpecificGraph.c +++ b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/planaritySpecificGraph.c @@ -10,6 +10,12 @@ See the LICENSE.TXT file for licensing information. #pragma clang diagnostic ignored "-Wmissing-prototypes" #pragma clang diagnostic ignored "-Wdeprecated-non-prototype" #pragma clang diagnostic ignored "-Wincompatible-pointer-types-discards-qualifiers" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-prototypes" +#pragma GCC diagnostic ignored "-Wmissing-prototypes" +#pragma GCC diagnostic ignored "-Wswitch-default" +#pragma GCC diagnostic ignored "-Wdiscarded-qualifiers" #endif #include "planarity.h" @@ -183,4 +189,6 @@ void WriteAlgorithmResults(graphP theGraph, int Result, char command, platform_t } #if defined(__clang__) #pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop #endif diff --git a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/planarityUtils.c b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/planarityUtils.c index a975ee707..f8829240b 100644 --- a/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/planarityUtils.c +++ b/extern/edge-addition-planarity-suite-Version_3.0.1.0/c/planarityUtils.c @@ -11,6 +11,14 @@ See the LICENSE.TXT file for licensing information. #pragma clang diagnostic ignored "-Wdeprecated-non-prototype" #pragma clang diagnostic ignored \ "-Wincompatible-pointer-types-discards-qualifiers" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-prototypes" +#pragma GCC diagnostic ignored "-Wmissing-prototypes" +#pragma GCC diagnostic ignored "-Wold-style-definition" +#pragma GCC diagnostic ignored "-Wdiscarded-qualifiers" +#pragma GCC diagnostic ignored "-Wswitch-default" +#pragma GCC diagnostic ignored "-Wunused-result" #endif #include "planarity.h" @@ -414,4 +422,6 @@ char *ConstructPrimaryOutputFilename(char *infileName, char *outfileName, char c } #if defined(__clang__) #pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop #endif diff --git a/src/bliss-includes.h b/src/bliss-includes.h index bf049d8bd..911efa9bb 100644 --- a/src/bliss-includes.h +++ b/src/bliss-includes.h @@ -20,6 +20,9 @@ #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wformat-nonliteral" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-nonliteral" #endif // GAP headers @@ -37,6 +40,8 @@ #if defined(__clang__) #pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop #endif #endif // DIGRAPHS_SRC_BLISS_INCLUDES_H_ diff --git a/src/digraphs.c b/src/digraphs.c index 2f20c3999..1fb90ce39 100644 --- a/src/digraphs.c +++ b/src/digraphs.c @@ -1140,7 +1140,8 @@ static Obj FLOYD_WARSHALL(Obj digraph, bool copy, bool diameter, bool shortest) { - Int n, i, j, k, *dist, *adj; + Int n, i, j, k, *dist; + Int* adj = NULL; Obj next, out, outi, val; n = DigraphNrVertices(digraph); @@ -1204,9 +1205,7 @@ static Obj FLOYD_WARSHALL(Obj digraph, maximum = dist[i * n + j]; } else if (dist[i * n + j] == -1) { free(dist); - if (copy) { - free(adj); - } + free(adj); return Fail; } } @@ -2370,6 +2369,9 @@ static StructInitInfo module = { #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wmissing-prototypes" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-prototypes" #endif StructInitInfo* Init__Dynamic(void) { return &module; @@ -2380,5 +2382,7 @@ StructInitInfo* Init__digraphs(void) { } #if defined(__clang__) #pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop #endif #endif diff --git a/src/gap-includes.h b/src/gap-includes.h index b824cc497..5277bf4b8 100644 --- a/src/gap-includes.h +++ b/src/gap-includes.h @@ -18,6 +18,11 @@ #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeclaration-after-statement" +#elif defined (__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeclaration-after-statement" +#pragma GCC diagnostic ignored "-Wpedantic" +#pragma GCC diagnostic ignored "-Winline" #endif // GAP headers #include "compiled.h" // for Obj, Int diff --git a/src/planar.c b/src/planar.c index 373ef2677..b53355416 100644 --- a/src/planar.c +++ b/src/planar.c @@ -27,6 +27,10 @@ #pragma clang diagnostic ignored \ "-Wincompatible-pointer-types-discards-qualifiers" #pragma clang diagnostic ignored "-Wstrict-prototypes" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-prototypes" +#pragma GCC diagnostic ignored "-Wswitch-default" #endif #ifdef DIGRAPHS_WITH_INCLUDED_PLANARITY #include "c/graph.h" @@ -41,6 +45,8 @@ #endif #if defined(__clang__) #pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop #endif // Forward declaration of the main function in this file. @@ -143,6 +149,8 @@ Obj boyers_planarity_check(Obj digraph, int flags, bool krtwsk) { case EMBEDFLAGS_SEARCHFORK4: gp_AttachK4Search(theGraph); break; + default: + break; } if (gp_InitGraph(theGraph, V) != OK) { gp_Free(&theGraph);