Skip to content

Commit

Permalink
Fixes warnings:
Browse files Browse the repository at this point in the history
'uninitialized variable'
'coversion from string literal to char *'
Issue eclipse-openj9#897

Signed-off-by: Matthew Hall <matthew.hall3@outlook.com>
  • Loading branch information
matthewhall2 committed Aug 20, 2024
1 parent be1d747 commit 0952b8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions runtime/compiler/z/codegen/J9CodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ J9::Z::CodeGenerator::callUsesHelperImplementation(TR::Symbol *sym)
TR::Linkage *
J9::Z::CodeGenerator::createLinkage(TR_LinkageConventions lc)
{
TR::Linkage * linkage;
TR::Linkage * linkage = nullptr;
switch (lc)
{
case TR_CHelper:
Expand Down Expand Up @@ -3259,9 +3259,9 @@ J9::Z::CodeGenerator::checkFieldAlignmentForAtomicLong()
if (!classBlock)
return false;

char* fieldName = "value";
const char* fieldName = "value";
int32_t fieldNameLen = 5;
char * fieldSig = "J";
const char * fieldSig = "J";
int32_t fieldSigLen = 1;
int32_t intOrBoolOffset = self()->fe()->getObjectHeaderSizeInBytes() + self()->fej9()->getInstanceFieldOffset(classBlock, fieldName, fieldNameLen, fieldSig, fieldSigLen);
return (intOrBoolOffset & 0x3) == 0;
Expand Down

0 comments on commit 0952b8b

Please sign in to comment.