intel / gmmlib

Other
158 stars 86 forks source link

Fix null conversion and arithmetic warning #82

Closed edwarddavidbaker closed 3 years ago

edwarddavidbaker commented 3 years ago
warning: implicit conversion of NULL constant to 'unsigned long' [-Wnull-conversion]
Source/GmmLib/TranslationTable/GmmPageTableMgr.cpp:415:50:
    return AuxTTObj ? AuxTTObj->GetL3Address() : NULL;
    ~~~~~~                                       ^~~~
                                                 0

warning: comparison between NULL and non-pointer ('GMM_GFX_ADDRESS' (aka 'unsigned long') and NULL) [-Wnull-arithmetic]
Source/GmmLib/TranslationTable/GmmPageTableMgr.cpp:474:28:
    if(GetAuxL3TableAddr() == NULL)
       ~~~~~~~~~~~~~~~~~~~ ^  ~~~~
edwarddavidbaker commented 3 years ago

Fixed in https://github.com/intel/gmmlib/commit/5647e870efe9f57bec1db10fea04d6d4126747a0 .