Changeset 1416:f179aa1045a4 in lemon
- Timestamp:
- 11/01/18 11:27:05 (6 years ago)
- Branch:
- default
- Children:
- 1417:2236d00ca778, 1422:332eab7995fe
- Phase:
- public
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
CMakeLists.txt
r1398 r1416 149 149 ENDIF() 150 150 151 IF( ( ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") AND 152 ("${CMAKE_CXX_COMPILER_VERSION}" VERSION_GREATER_EQUAL "4.8") ) 153 OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") 154 OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") 155 ) 156 SET(LEMON_NO_UNUSED_LOCAL_TYPEDEF_WARNINGS TRUE) 157 ENDIF() 151 158 152 159 IF(DEFINED ENV{LEMON_CXX_WARNING}) 153 160 SET(CXX_WARNING $ENV{LEMON_CXX_WARNING}) 154 161 ELSE() 155 IF(CMAKE_COMPILER_IS_GNUCXX) 162 IF( ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") 163 OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") 164 ) 156 165 SET(CXX_WARNING "-Wall -W -Wunused -Wformat=2 -Wctor-dtor-privacy -Wnon-virtual-dtor -Wno-char-subscripts -Wwrite-strings -Wno-char-subscripts -Wreturn-type -Wcast-qual -Wcast-align -Wsign-promo -Woverloaded-virtual -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas") 166 SET(CMAKE_CXX_FLAGS_DEBUG CACHE STRING "-ggdb") 167 SET(CMAKE_C_FLAGS_DEBUG CACHE STRING "-ggdb") 168 ELSEIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") 169 SET(CXX_WARNING "-Wall -W -Wunused -Wformat=2 -Wnon-virtual-dtor -Wno-char-subscripts -Wwrite-strings -Wno-char-subscripts -Wreturn-type -Wcast-qual -Wsign-promo -Woverloaded-virtual -fno-strict-aliasing -Wno-unknown-pragmas") 157 170 SET(CMAKE_CXX_FLAGS_DEBUG CACHE STRING "-ggdb") 158 171 SET(CMAKE_C_FLAGS_DEBUG CACHE STRING "-ggdb") -
lemon/bfs.h
r1270 r1416 1377 1377 struct SetReachedMapTraits : public Traits { 1378 1378 typedef T ReachedMap; 1379 static ReachedMap *createReachedMap(const Digraph & digraph) {1379 static ReachedMap *createReachedMap(const Digraph &) { 1380 1380 LEMON_ASSERT(false, "ReachedMap is not initialized"); 1381 1381 return 0; // ignore warnings -
lemon/concepts/graph_components.h
r1270 r1416 104 104 i1=INVALID; 105 105 _GraphItem i2 = i1; 106 ::lemon::ignore_unused_variable_warning(i2); 106 107 _GraphItem i3 = INVALID; 107 108 … … 735 736 736 737 Item bi = it1; 738 ::lemon::ignore_unused_variable_warning(bi); 737 739 bi = it2; 738 740 } … … 825 827 ++(++it1); 826 828 Item e = it1; 829 ::lemon::ignore_unused_variable_warning(e); 827 830 e = it2; 828 831 } -
lemon/concepts/path.h
r1270 r1416 71 71 /// \brief Template copy constructor 72 72 template <typename CPath> 73 Path(const CPath& cpath) {} 73 Path(const CPath& cpath) { 74 ::lemon::ignore_unused_variable_warning(cpath); 75 } 74 76 75 77 /// \brief Template assigment operator -
lemon/config.h.in
r1340 r1416 3 3 4 4 #define LEMON_VERSION "@PROJECT_VERSION@" 5 5 6 #cmakedefine LEMON_HAVE_LONG_LONG 1 6 7 … … 27 28 #cmakedefine LEMON_USE_WIN32_THREADS 1 28 29 30 #cmakedefine LEMON_NO_UNUSED_LOCAL_TYPEDEF_WARNINGS 1 31 29 32 #endif -
lemon/core.h
r1341 r1416 34 34 // C4800: 'type' : forcing value to bool 'true' or 'false' (performance warning) 35 35 // C4996: 'function': was declared deprecated 36 37 #include <lemon/config.h> 38 36 39 #ifdef _MSC_VER 37 40 #pragma warning( disable : 4250 4267 4355 4503 4800 4996 ) 38 41 #endif 39 42 40 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)41 // Needed by the [DI]GRAPH_TYPEDEFS marcos for gcc 4.843 #if LEMON_NO_UNUSED_LOCAL_TYPEDEF_WARNINGS 44 // Needed by the [DI]GRAPH_TYPEDEFS marcos for gcc >=4.8 and clang 42 45 #pragma GCC diagnostic ignored "-Wunused-local-typedefs" 43 46 #endif … … 46 49 #include <algorithm> 47 50 48 #include <lemon/config.h>49 51 #include <lemon/bits/enable_if.h> 50 52 #include <lemon/bits/traits.h> -
lemon/dfs.h
r1270 r1416 1319 1319 struct SetReachedMapTraits : public Traits { 1320 1320 typedef T ReachedMap; 1321 static ReachedMap *createReachedMap(const Digraph & digraph) {1321 static ReachedMap *createReachedMap(const Digraph &) { 1322 1322 LEMON_ASSERT(false, "ReachedMap is not initialized"); 1323 1323 return 0; // ignore warnings -
lemon/nagamochi_ibaraki.h
r1270 r1416 175 175 typedef CR HeapCrossRef; 176 176 typedef H Heap; 177 static HeapCrossRef *createHeapCrossRef(int num) {177 static HeapCrossRef *createHeapCrossRef(int) { 178 178 LEMON_ASSERT(false, "HeapCrossRef is not initialized"); 179 179 return 0; // ignore warnings -
test/adaptors_test.cc
r1270 r1416 146 146 // Check the conversion of nodes and arcs 147 147 Digraph::Node nd = n4; 148 ::lemon::ignore_unused_variable_warning(nd); 148 149 nd = n4; 149 150 Adaptor::Node na = n1; 151 ::lemon::ignore_unused_variable_warning(na); 150 152 na = n2; 151 153 Digraph::Arc ad = a4; 154 ::lemon::ignore_unused_variable_warning(ad); 152 155 ad = a5; 153 156 Adaptor::Arc aa = a1; 157 ::lemon::ignore_unused_variable_warning(aa); 154 158 aa = a2; 155 159 } … … 270 274 // Check the conversion of nodes and arcs 271 275 Digraph::Node nd = n3; 276 ::lemon::ignore_unused_variable_warning(nd); 272 277 nd = n3; 273 278 Adaptor::Node na = n1; 279 ::lemon::ignore_unused_variable_warning(na); 274 280 na = n2; 275 281 Digraph::Arc ad = a3; 282 ::lemon::ignore_unused_variable_warning(ad); 276 283 ad = a3; 277 284 Adaptor::Arc aa = a1; 285 ::lemon::ignore_unused_variable_warning(aa); 278 286 aa = a2; 279 287 } … … 366 374 // Check the conversion of nodes and arcs 367 375 Digraph::Node nd = n3; 376 ::lemon::ignore_unused_variable_warning(nd); 368 377 nd = n3; 369 378 Adaptor::Node na = n1; 379 ::lemon::ignore_unused_variable_warning(na); 370 380 na = n2; 371 381 Digraph::Arc ad = a3; 382 ::lemon::ignore_unused_variable_warning(ad); 372 383 ad = a3; 373 384 Adaptor::Arc aa = a1; 385 ::lemon::ignore_unused_variable_warning(aa); 374 386 aa = a2; 375 387 } … … 464 476 // Check the conversion of nodes and arcs 465 477 Digraph::Node nd = n3; 478 ::lemon::ignore_unused_variable_warning(nd); 466 479 nd = n3; 467 480 Adaptor::Node na = n1; 481 ::lemon::ignore_unused_variable_warning(na); 468 482 na = n2; 469 483 Digraph::Arc ad = a3; 484 ::lemon::ignore_unused_variable_warning(ad); 470 485 ad = a3; 471 486 Adaptor::Arc aa = a1; 487 ::lemon::ignore_unused_variable_warning(aa); 472 488 aa = a2; 473 489 } … … 575 591 // Check the conversion of nodes and arcs/edges 576 592 Digraph::Node nd = n3; 593 ::lemon::ignore_unused_variable_warning(nd); 577 594 nd = n3; 578 595 Adaptor::Node na = n1; 596 ::lemon::ignore_unused_variable_warning(na); 579 597 na = n2; 580 598 Digraph::Arc ad = e3; 599 ::lemon::ignore_unused_variable_warning(ad); 581 600 ad = e3; 582 601 Adaptor::Edge ea = a1; 602 ::lemon::ignore_unused_variable_warning(ea); 583 603 ea = a2; 584 604 } … … 735 755 // Check the conversion of nodes and arcs 736 756 Digraph::Node nd = Adaptor::NodeIt(adaptor); 757 ::lemon::ignore_unused_variable_warning(nd); 737 758 nd = ++Adaptor::NodeIt(adaptor); 738 759 Adaptor::Node na = n1; 760 ::lemon::ignore_unused_variable_warning(na); 739 761 na = n2; 740 762 Digraph::Arc ad = Adaptor::ArcIt(adaptor); 763 ::lemon::ignore_unused_variable_warning(ad); 741 764 ad = ++Adaptor::ArcIt(adaptor); 742 765 } … … 988 1011 // Check the conversion of nodes and edges 989 1012 Graph::Node ng = n3; 1013 ::lemon::ignore_unused_variable_warning(ng); 990 1014 ng = n4; 991 1015 Adaptor::Node na = n1; 1016 ::lemon::ignore_unused_variable_warning(na); 992 1017 na = n2; 993 1018 Graph::Edge eg = e3; 1019 ::lemon::ignore_unused_variable_warning(eg); 994 1020 eg = e4; 995 1021 Adaptor::Edge ea = e1; 1022 ::lemon::ignore_unused_variable_warning(ea); 996 1023 ea = e2; 997 1024 } … … 1093 1120 // Check the conversion of nodes and edges 1094 1121 Graph::Node ng = n3; 1122 ::lemon::ignore_unused_variable_warning(ng); 1095 1123 ng = n4; 1096 1124 Adaptor::Node na = n1; 1125 ::lemon::ignore_unused_variable_warning(na); 1097 1126 na = n2; 1098 1127 Graph::Edge eg = e3; 1128 ::lemon::ignore_unused_variable_warning(eg); 1099 1129 eg = e4; 1100 1130 Adaptor::Edge ea = e1; 1131 ::lemon::ignore_unused_variable_warning(ea); 1101 1132 ea = e2; 1102 1133 } … … 1199 1230 // Check the conversion of nodes and edges 1200 1231 Graph::Node ng = n3; 1232 ::lemon::ignore_unused_variable_warning(ng); 1201 1233 ng = n4; 1202 1234 Adaptor::Node na = n1; 1235 ::lemon::ignore_unused_variable_warning(na); 1203 1236 na = n2; 1204 1237 Graph::Edge eg = e3; 1238 ::lemon::ignore_unused_variable_warning(eg); 1205 1239 eg = e4; 1206 1240 Adaptor::Edge ea = e1; 1241 ::lemon::ignore_unused_variable_warning(ea); 1207 1242 ea = e2; 1208 1243 } … … 1357 1392 // Check the conversion of nodes and arcs/edges 1358 1393 Graph::Node ng = n3; 1394 ::lemon::ignore_unused_variable_warning(ng); 1359 1395 ng = n3; 1360 1396 Adaptor::Node na = n1; 1397 ::lemon::ignore_unused_variable_warning(na); 1361 1398 na = n2; 1362 1399 Graph::Edge eg = e3; 1400 ::lemon::ignore_unused_variable_warning(eg); 1363 1401 eg = e3; 1364 1402 Adaptor::Arc aa = e1; 1403 ::lemon::ignore_unused_variable_warning(aa); 1365 1404 aa = e2; 1366 1405 }
Note: See TracChangeset
for help on using the changeset viewer.