From 47c153629f78073bcfda223b8e9885e2280d4108 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Mon, 19 Sep 2022 15:57:48 -0700 Subject: Compiler warnings. --- abclib.dsp | 4 ++++ src/aig/gia/giaTtopt.cpp | 34 +++++++++++++++++++++++----------- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/abclib.dsp b/abclib.dsp index 7006941b..d460427c 100644 --- a/abclib.dsp +++ b/abclib.dsp @@ -5299,6 +5299,10 @@ SOURCE=.\src\aig\gia\giaTsim.c # End Source File # Begin Source File +SOURCE=.\src\aig\gia\giaTtopt.cpp +# End Source File +# Begin Source File + SOURCE=.\src\aig\gia\giaUnate.c # End Source File # Begin Source File diff --git a/src/aig/gia/giaTtopt.cpp b/src/aig/gia/giaTtopt.cpp index 8939a87b..398bc7ff 100644 --- a/src/aig/gia/giaTtopt.cpp +++ b/src/aig/gia/giaTtopt.cpp @@ -1,4 +1,11 @@ // Author : Yukio Miyasaka + +#ifdef _WIN32 +#ifndef __MINGW32__ +#pragma warning(disable : 4786) // warning C4786: identifier was truncated to '255' characters in the browser information +#endif +#endif + #include #include #include @@ -301,14 +308,15 @@ public: Save(0); SaveIndices(0); std::vector vars(nInputs); - for(int i = 0; i < nInputs; i++) { + int i; + for(i = 0; i < nInputs; i++) { vars[i] = i; } std::vector vCounts(nInputs); - for(int i = 0; i < nInputs; i++) { + for(i = 0; i < nInputs; i++) { vCounts[i] = BDDNodeCountLevel(vLevels[i]); } - for(int i = 1; i < nInputs; i++) { + for(i = 1; i < nInputs; i++) { int j = i; while(j > 0 && vCounts[vars[j-1]] < vCounts[vars[j]]) { std::swap(vars[j], vars[j-1]); @@ -316,7 +324,8 @@ public: } } bool turn = true; - for(unsigned j = 0; j < vars.size(); j++) { + unsigned j; + for(j = 0; j < vars.size(); j++) { int var = vars[j]; bool updated = false; int lev = vLevels[var]; @@ -371,10 +380,11 @@ public: Save(2); for(int i = 0; i < nRound; i++) { std::vector vLevelsNew(nInputs); - for(int j = 0; j < nInputs; j++) { + int j; + for(j = 0; j < nInputs; j++) { vLevelsNew[j] = j; } - for(int j = nInputs - 1; j > 0; j--) { + for(j = nInputs - 1; j > 0; j--) { int d = rand() % j; std::swap(vLevelsNew[j], vLevelsNew[d]); } @@ -420,10 +430,11 @@ public: vvIndices.resize(nInputs); std::vector > vvNodes(nInputs); std::vector vInputs(nInputs); - for(int i = 0; i < nInputs; i++) { + int i; + for(i = 0; i < nInputs; i++) { vInputs[vLevels[i]] = Vec_IntEntry(vSupp, nInputs - i - 1) << 1; } - for(int i = 0; i < nOutputs; i++) { + for(i = 0; i < nOutputs; i++) { int node = BDDGenerateAigRec(pNew, vInputs, vvNodes, i, 0); Gia_ManAppendCo(pNew, node); } @@ -918,17 +929,18 @@ public: int BDDRebuild(int lev) { RestoreCare(); - for(int i = lev; i < nInputs; i++) { + int i; + for(i = lev; i < nInputs; i++) { vvIndices[i].clear(); vvMergedIndices[i].clear(); if(i) { vvRedundantIndices[i-1].clear(); } } - for(int i = 0; i < lev; i++) { + for(i = 0; i < lev; i++) { BDDRebuildByMerge(i); } - for(int i = lev; i < nInputs; i++) { + for(i = lev; i < nInputs; i++) { if(!i) { for(int j = 0; j < nOutputs; j++) { if(!IsDC(j, 0)) { -- cgit v1.2.3