diff --git a/runtime/compiler/optimizer/InlinerTempForJ9.cpp b/runtime/compiler/optimizer/InlinerTempForJ9.cpp index dd0b51a641c..57af36ce736 100644 --- a/runtime/compiler/optimizer/InlinerTempForJ9.cpp +++ b/runtime/compiler/optimizer/InlinerTempForJ9.cpp @@ -4048,11 +4048,11 @@ TR_MultipleCallTargetInliner::exceedsSizeThreshold(TR_CallSite *callSite, int by return false; TR_J9InlinerPolicy *j9InlinerPolicy = (TR_J9InlinerPolicy *)getPolicy(); - static char *polymorphicCalleeSizeThresholdStr = feGetEnv("TR_InlinerPolymorphicConservatismCalleeSize"); + static const char *polymorphicCalleeSizeThresholdStr = feGetEnv("TR_InlinerPolymorphicConservatismCalleeSize"); int polymorphicCalleeSizeThreshold = polymorphicCalleeSizeThresholdStr ? atoi(polymorphicCalleeSizeThresholdStr) : 10; - static char *polymorphicRootSizeThresholdStr = feGetEnv("TR_InlinerPolymorphicConservatismRootSize"); + static const char *polymorphicRootSizeThresholdStr = feGetEnv("TR_InlinerPolymorphicConservatismRootSize"); int polymorphicRootSizeThreshold = polymorphicRootSizeThresholdStr ? atoi(polymorphicRootSizeThresholdStr) : 30; - static char *trustedInterfacePattern = feGetEnv("TR_TrustedPolymorphicInterfaces"); + static const char *trustedInterfacePattern = feGetEnv("TR_TrustedPolymorphicInterfaces"); static TR::SimpleRegex *trustedInterfaceRegex = trustedInterfacePattern ? TR::SimpleRegex::create(trustedInterfacePattern) : NULL; // we need to be conservative about inlining potentially highly polymorphic interface calls for // functional frameworks like scala - we limit this to hot and above diff --git a/runtime/compiler/runtime/IProfiler.cpp b/runtime/compiler/runtime/IProfiler.cpp index c36be3aa4fe..7121d725fc6 100644 --- a/runtime/compiler/runtime/IProfiler.cpp +++ b/runtime/compiler/runtime/IProfiler.cpp @@ -134,7 +134,7 @@ void printHashedCallSite ( TR_IPHashedCallSite * hcs, ::FILE* fout = stderr, voi static bool matchesRegularExpression (TR::Compilation* comp) { - static char* cRegex = feGetEnv ("TR_printIfRegex"); + static const char *cRegex = feGetEnv ("TR_printIfRegex"); if (cRegex && comp->getOptions()) { static TR::SimpleRegex * regex = TR::SimpleRegex::create(cRegex);