Skip to content

Commit

Permalink
Fix -Wconversion-null
Browse files Browse the repository at this point in the history
```
warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null]
```
  • Loading branch information
fjeremic committed Jun 17, 2021
1 parent 61593b2 commit 186ac2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/z/codegen/OMRTreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6506,7 +6506,7 @@ bool relativeLongLoadHelper(TR::CodeGenerator * cg, TR::Node * node, TR::Registe

TR::SymbolReference * symRef = node->getSymbolReference();
TR::Symbol * symbol = symRef->getSymbol();
uintptr_t staticAddress = symbol->isStatic() ? (uintptr_t)symRef->getSymbol()->getStaticSymbol()->getStaticAddress() : NULL;
uintptr_t staticAddress = symbol->isStatic() ? reinterpret_cast<uintptr_t>(symRef->getSymbol()->getStaticSymbol()->getStaticAddress()) : 0;

if (symbol->isStatic() &&
!symRef->isUnresolved() &&
Expand Down Expand Up @@ -6851,7 +6851,7 @@ bool relativeLongStoreHelper(TR::CodeGenerator * cg, TR::Node * node, TR::Node *
{
TR::SymbolReference * symRef = node->getSymbolReference();
TR::Symbol * symbol = symRef->getSymbol();
uintptr_t staticAddress = symbol->isStatic() ? (uintptr_t)symRef->getSymbol()->getStaticSymbol()->getStaticAddress() : NULL;
uintptr_t staticAddress = symbol->isStatic() ? reinterpret_cast<uintptr_t>(symRef->getSymbol()->getStaticSymbol()->getStaticAddress()) : 0;

if (symbol->isStatic() &&
!symRef->isUnresolved() &&
Expand Down

0 comments on commit 186ac2f

Please sign in to comment.