Skip to content

Commit

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

Signed-off-by: Dylan Tuttle <[email protected]>
  • Loading branch information
dylanjtuttle committed Dec 13, 2023
1 parent 3bf8f94 commit ec025b8
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
14 changes: 7 additions & 7 deletions runtime/compiler/p/codegen/CallSnippet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@ TR_MHJ2IThunk *TR::PPCCallSnippet::generateInvokeExactJ2IThunk(TR::Node *callNod
uint8_t *
TR_Debug::printPPCArgumentsFlush(TR::FILE *pOutFile, TR::Node *node, uint8_t *cursor, int32_t argSize)
{
char *storeGPROpName;
const char *storeGPROpName;
int32_t offset = 0,
intArgNum = 0,
floatArgNum = 0;
Expand Down Expand Up @@ -1427,8 +1427,8 @@ TR_Debug::print(TR::FILE *pOutFile, TR::PPCCallSnippet * snippet)

cursor = printPPCArgumentsFlush(pOutFile, callNode, cursor, snippet->getSizeOfArguments());

char *info = "";
int32_t distance;
const char *info = "";
int32_t distance;
if (isBranchToTrampoline(glueRef, cursor, distance))
info = " Through trampoline";

Expand Down Expand Up @@ -1526,8 +1526,8 @@ TR_Debug::print(TR::FILE *pOutFile, TR::PPCVirtualUnresolvedSnippet * snippet)

printSnippetLabel(pOutFile, snippet->getSnippetLabel(), cursor, "Virtual Unresolved Call Snippet");

char *info = "";
int32_t distance;
const char *info = "";
int32_t distance;
if (isBranchToTrampoline(_cg->getSymRef(TR_PPCvirtualUnresolvedHelper), cursor, distance))
info = " Through trampoline";

Expand Down Expand Up @@ -1575,8 +1575,8 @@ TR_Debug::print(TR::FILE *pOutFile, TR::PPCInterfaceCallSnippet * snippet)

printSnippetLabel(pOutFile, snippet->getSnippetLabel(), cursor, "Interface Call Snippet");

char *info = "";
int32_t distance;
const char *info = "";
int32_t distance;
if (isBranchToTrampoline(_cg->getSymRef(TR_PPCinterfaceCallHelper), cursor, distance))
info = " Through trampoline";

Expand Down
2 changes: 1 addition & 1 deletion runtime/compiler/p/codegen/ForceRecompilationSnippet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ TR_Debug::print(TR::FILE *pOutFile, TR::PPCForceRecompilationSnippet * snippet)
cursor += 4;
}

char *info = "";
const char *info = "";
if (isBranchToTrampoline(_cg->getSymRef(TR_PPCinduceRecompilation), cursor, value))
info = " Through trampoline";

Expand Down
8 changes: 4 additions & 4 deletions runtime/compiler/p/codegen/J9TreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8816,7 +8816,7 @@ static TR::Register *inlineAtomicOps(TR::Node *node, TR::CodeGenerator *cg, int8
if (!isArray)
{
TR_OpaqueClassBlock * bdClass;
char *className, *fieldSig;
const char *className, *fieldSig;
int32_t classNameLen, fieldSigLen;

fieldSigLen = 1;
Expand Down Expand Up @@ -8878,7 +8878,7 @@ static TR::Register *inlineAtomicOps(TR::Node *node, TR::CodeGenerator *cg, int8
shiftAmount = 3;

TR_OpaqueClassBlock * bdClass;
char *className, *fieldSig;
const char *className, *fieldSig;
int32_t classNameLen, fieldSigLen;

fieldSigLen = 1;
Expand Down Expand Up @@ -9379,7 +9379,7 @@ static TR::Register *inlineAtomicOperation(TR::Node *node, TR::CodeGenerator *cg
else if (!isArray)
{
TR_OpaqueClassBlock *classBlock;
char *className, *fieldSig;
const char *className, *fieldSig;
int32_t classNameLen, fieldSigLen;
fieldSigLen = 1;

Expand Down Expand Up @@ -9432,7 +9432,7 @@ static TR::Register *inlineAtomicOperation(TR::Node *node, TR::CodeGenerator *cg
fieldOffset = TR::Compiler->om.contiguousArrayHeaderSizeInBytes();

TR_OpaqueClassBlock *classBlock;
char *className, *fieldSig;
const char *className, *fieldSig;
int32_t classNameLen, fieldSigLen;
fieldSigLen = 1;

Expand Down
4 changes: 2 additions & 2 deletions runtime/compiler/p/codegen/J9UnresolvedDataSnippet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,8 @@ TR_Debug::print(TR::FILE *pOutFile, TR::UnresolvedDataSnippet * snippet)
glueRef = _cg->getSymRef(TR_PPCinterpreterUnresolvedStaticDataGlue);
}

char *info = "";
int32_t distance;
const char *info = "";
int32_t distance;
if (isBranchToTrampoline(glueRef, cursor, distance))
info = " Through Trampoline";

Expand Down
4 changes: 2 additions & 2 deletions runtime/compiler/p/codegen/PPCRecompilationSnippet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ TR_Debug::print(TR::FILE *pOutFile, TR::PPCRecompilationSnippet * snippet)

printSnippetLabel(pOutFile, snippet->getSnippetLabel(), cursor, "Counting Recompilation Snippet");

char *info = "";
int32_t distance;
const char *info = "";
int32_t distance;
if (isBranchToTrampoline(_cg->getSymRef(TR_PPCcountingRecompileMethod), cursor, distance))
info = " Through trampoline";

Expand Down
4 changes: 2 additions & 2 deletions runtime/compiler/p/codegen/StackCheckFailureSnippet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,8 @@ TR_Debug::print(TR::FILE *pOutFile, TR::PPCStackCheckFailureSnippet * snippet)
cursor += 4;
}

char *info = "";
int32_t distance;
const char *info = "";
int32_t distance;
if (isBranchToTrampoline(_comp->getSymRefTab()->element(TR_stackOverflow), cursor, distance))
info = " Through trampoline";

Expand Down
6 changes: 3 additions & 3 deletions runtime/compiler/p/runtime/PPCHWProfilerAIX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ struct pmapiInterface
int (*pm_delete_program_mythread)();
int (*pm_start_mythread)();
int (*pm_stop_mythread)();
char* (*pm_strerror)(char *where, int error);
char* (*pm_strerror)(const char *where, int error);
int (*pm_get_data_mythread)(pm_data_t *data);
// Private, not declared in pmapi.h
int (*pm_set_ebb_handler)(void *handler_address, void *data_area);
Expand Down Expand Up @@ -107,7 +107,7 @@ static bool pmapiInit()
goto fail;
}

char *curSym;
const char *curSym;
curSym = "pm_initialize";
pmapi.pm_initialize = (int (*)(int, pm_info2_t *, pm_groups_info_t *, int))dlsym(pmapi.dlHandle, curSym);
if (!pmapi.pm_initialize)
Expand Down Expand Up @@ -149,7 +149,7 @@ static bool pmapiInit()
if (!pmapi.pm_disable_bhrb)
goto pmapiClose;
curSym = "pm_strerror";
pmapi.pm_strerror = (char* (*)(char *, int))dlsym(pmapi.dlHandle, curSym);
pmapi.pm_strerror = (char* (*)(const char *, int))dlsym(pmapi.dlHandle, curSym);
if (!pmapi.pm_strerror)
goto pmapiClose;
curSym = "pm_get_data_mythread";
Expand Down

0 comments on commit ec025b8

Please sign in to comment.