1 year ago

#193371

test-img

Nebi S.

DragonSoul.cpp:516:18: warning: the compiler can assume that the address of 'aItemPoses' will never be NULL [-Waddress]

I am getting a warning when compiling with gcc11 c++20. Can you help me solve it?

ERROR:

DragonSoul.cpp:516:18: warning: the compiler can assume that the address of 'aItemPoses' will never be NULL [-Waddress]

DragonSoul.cpp:516:9: warning: 'nonnull' argument 'aItemPoses' compared to NULL [-Wnonnull-compare]

CODE:

bool DSManager::DoRefineGrade(LPCHARACTER ch, TItemPos (&aItemPoses)[DRAGON_SOUL_REFINE_GRID_SIZE])
{
    if (NULL == ch)
        return false;
    
    if (NULL == aItemPoses)
    {
        return false;
    }
    ...

c++

ifnull

0 Answers

Your Answer

Accepted video resources