From c79a7ad6b00df9200d7c22d47650e3c6306d2f7b Mon Sep 17 00:00:00 2001 From: Sergei Date: Wed, 16 Dec 2020 11:46:28 -0500 Subject: [PATCH] LGTM fixes --- src/core/likefunc.cpp | 6 +++--- src/lib/setup.py | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/core/likefunc.cpp b/src/core/likefunc.cpp index 004d3094d..08cfbf962 100644 --- a/src/core/likefunc.cpp +++ b/src/core/likefunc.cpp @@ -3690,8 +3690,8 @@ void _LikelihoodFunction::SetupLFCaches (void) { _AVLListX foundCharacters (&foundCharactersAux); _String aState ((unsigned long)atomSize); - char const ** columnBlock = (char const**)alloca(atomSize*sizeof (const char*)); - hyFloat * translationCache = (hyFloat*)alloca (sizeof (hyFloat)* stateSpaceDim); + char const ** columnBlock = (char const**)malloc(atomSize*sizeof (const char*)); + hyFloat * translationCache = (hyFloat*)malloc (sizeof (hyFloat)* stateSpaceDim); _Vector * ambigs = new _Vector(); for (unsigned long siteID = 0UL; siteID < patternCount; siteID ++) { @@ -3726,7 +3726,7 @@ void _LikelihoodFunction::SetupLFCaches (void) { conditionalTerminalNodeStateFlag [i][leafID*patternCount + siteID] = translation; } } - // free (columnBlock); free (translationCache); + free (columnBlock); free (translationCache); conditionalTerminalNodeLikelihoodCaches < ambigs; errorTolerance = MAX (1.,round (log (1.+maxFilterSize)/log (10))); #ifdef MDSOCL diff --git a/src/lib/setup.py b/src/lib/setup.py index a591bbc6c..8b36da24b 100644 --- a/src/lib/setup.py +++ b/src/lib/setup.py @@ -5,7 +5,6 @@ from glob import glob import sys -from platform import architecture, mac_ver #incdir = get_python_inc(plat_specific=1) #print incdir