Skip to content

Commit

Permalink
Fix string literal conversion warnings in compiler/codegen
Browse files Browse the repository at this point in the history
Fix string literal conversion warnings in compiler/codegen

Signed-off-by: Dylan Tuttle <jdylantuttle@gmail.com>
  • Loading branch information
dylanjtuttle committed Dec 12, 2023
1 parent 149b524 commit f2b7406
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion compiler/codegen/CodeGenRA.cpp
Expand Up @@ -2829,7 +2829,7 @@ OMR::CodeGenerator::simulateNodeEvaluation(TR::Node *node, TR_RegisterPressureSt
// don't properly account for cases where one child's result must live
// across the evaluation of another child.
//
char *tag = NULL;
const char *tag = NULL;
if ( nodeGotFoldedIntoMemref(node, state, self())
&& self()->simulatedNodeState(node)._willBeRematerialized == 0 // remat nodes have already had their children incremented, so we must decrement them
){
Expand Down
6 changes: 3 additions & 3 deletions compiler/codegen/OMRCodeGenerator.hpp
Expand Up @@ -1192,21 +1192,21 @@ class OMR_EXTENSIBLE CodeGenerator
uint8_t *target,
uint8_t *target2,
TR_ExternalRelocationTargetKind kind,
char *generatingFileName,
const char *generatingFileName,
uintptr_t generatingLineNumber,
TR::Node *node) {}
void addProjectSpecializedPairRelocation(uint8_t *location1,
uint8_t *location2,
uint8_t *target,
TR_ExternalRelocationTargetKind kind,
char *generatingFileName,
const char *generatingFileName,
uintptr_t generatingLineNumber,
TR::Node *node) {}
void addProjectSpecializedRelocation(TR::Instruction *instr,
uint8_t *target,
uint8_t *target2,
TR_ExternalRelocationTargetKind kind,
char *generatingFileName,
const char *generatingFileName,
uintptr_t generatingLineNumber,
TR::Node *node) {}

Expand Down
2 changes: 1 addition & 1 deletion compiler/codegen/Relocation.cpp
Expand Up @@ -497,7 +497,7 @@ uintptr_t TR::ExternalRelocation::_globalValueList[TR_NumGlobalValueItems] =
0 // TR_HeapSizeForBarrierRange0
};

char *TR::ExternalRelocation::_globalValueNames[TR_NumGlobalValueItems] =
const char *TR::ExternalRelocation::_globalValueNames[TR_NumGlobalValueItems] =
{
"not used (0)",
"TR_CountForRecompile (1)",
Expand Down
10 changes: 5 additions & 5 deletions compiler/codegen/Relocation.hpp
Expand Up @@ -424,17 +424,17 @@ class ExternalRelocation : public TR::Relocation
virtual bool isExternalRelocation() { return true; }

static const char *getName(TR_ExternalRelocationTargetKind k) {return _externalRelocationTargetKindNames[k];}
static uintptr_t getGlobalValue(uint32_t g)
static uintptr_t getGlobalValue(uint32_t g)
{
TR_ASSERT(g >= 0 && g < TR_NumGlobalValueItems, "invalid index for global item");
return _globalValueList[g];
}
static void setGlobalValue(uint32_t g, uintptr_t v)
static void setGlobalValue(uint32_t g, uintptr_t v)
{
TR_ASSERT(g >= 0 && g < TR_NumGlobalValueItems, "invalid index for global item");
_globalValueList[g] = v;
}
static char * nameOfGlobal(uint32_t g)
static const char *nameOfGlobal(uint32_t g)
{
TR_ASSERT(g >= 0 && g < TR_NumGlobalValueItems, "invalid index for global item");
return _globalValueNames[g];
Expand All @@ -443,12 +443,12 @@ class ExternalRelocation : public TR::Relocation
private:
uint8_t *_targetAddress;
uint8_t *_targetAddress2;
TR::IteratedExternalRelocation *_relocationRecord;
TR::IteratedExternalRelocation *_relocationRecord;
TR_ExternalRelocationTargetKind _kind;
static const char *_externalRelocationTargetKindNames[TR_NumExternalRelocationKinds];
static uintptr_t _globalValueList[TR_NumGlobalValueItems];
static uint8_t _globalValueSizeList[TR_NumGlobalValueItems];
static char *_globalValueNames[TR_NumGlobalValueItems];
static const char *_globalValueNames[TR_NumGlobalValueItems];
};

class ExternalOrderedPair32BitRelocation: public TR::ExternalRelocation
Expand Down
4 changes: 2 additions & 2 deletions compiler/codegen/StorageInfo.cpp
Expand Up @@ -35,7 +35,7 @@
#include "il/SymbolReference.hpp"
#include "infra/Assert.hpp"

char *TR_StorageInfo::TR_StorageClassNames[TR_NumStorageClassTypes] =
const char *TR_StorageInfo::TR_StorageClassNames[TR_NumStorageClassTypes] =
{
"<unknown_class>",
"<direct_mapped_auto>",
Expand All @@ -44,7 +44,7 @@ char *TR_StorageInfo::TR_StorageClassNames[TR_NumStorageClassTypes] =
"<private_static_base_address>",
};

char *TR_StorageInfo::TR_StorageOverlapKindNames[TR_NumOverlapTypes] =
const char *TR_StorageInfo::TR_StorageOverlapKindNames[TR_NumOverlapTypes] =
{
"NoOverlap",
"MayOverlap",
Expand Down
10 changes: 5 additions & 5 deletions compiler/codegen/StorageInfo.hpp
Expand Up @@ -81,12 +81,12 @@ class TR_StorageInfo

void print();

char *getName() { return getName(_class); }
const char *getName() { return getName(_class); }

static char *getName(TR_StorageClass klass)
static const char *getName(TR_StorageClass klass)
{ return ((klass < TR_NumStorageClassTypes) ? TR_StorageClassNames[klass] : (char*)"invalid_class"); }

static char *getName(TR_StorageOverlapKind overlapType)
static const char *getName(TR_StorageOverlapKind overlapType)
{ return ((overlapType < TR_NumOverlapTypes) ? TR_StorageOverlapKindNames[overlapType] : (char*)"invalid_overlap_type"); }

TR::Compilation *comp() { return _comp; }
Expand All @@ -100,8 +100,8 @@ class TR_StorageInfo
size_t _length;
TR_StorageClass _class;
TR::Compilation * _comp;
static char *TR_StorageClassNames[TR_NumStorageClassTypes];
static char *TR_StorageOverlapKindNames[TR_NumOverlapTypes];
static const char *TR_StorageClassNames[TR_NumStorageClassTypes];
static const char *TR_StorageOverlapKindNames[TR_NumOverlapTypes];

};

Expand Down

0 comments on commit f2b7406

Please sign in to comment.