Skip to content
Snippets Groups Projects
  • Guilherme Amadio's avatar
    0ef4f35d
    Avoid compiler warning in rootcling and rootcling_stage1 · 0ef4f35d
    Guilherme Amadio authored
    Warning:
    root/core/rootcling_stage1/src/rootcling_stage1.cxx(38):
    	warning #69: integer conversion resulted in truncation
    
       auto dummyVal = (int)(long)&usedToIdentifyRootClingByDlSym;
                        ^^^
    
    The method above uses a cast to long, followed by a cast to int,
    which results in a truncation. That is harmless, since the value
    is never used, but generates a compiler warning with ICC 17. This
    commit avoids the warning by storing the address of the same symbol
    in a static variable instead.
    0ef4f35d
    History
    Avoid compiler warning in rootcling and rootcling_stage1
    Guilherme Amadio authored
    Warning:
    root/core/rootcling_stage1/src/rootcling_stage1.cxx(38):
    	warning #69: integer conversion resulted in truncation
    
       auto dummyVal = (int)(long)&usedToIdentifyRootClingByDlSym;
                        ^^^
    
    The method above uses a cast to long, followed by a cast to int,
    which results in a truncation. That is harmless, since the value
    is never used, but generates a compiler warning with ICC 17. This
    commit avoids the warning by storing the address of the same symbol
    in a static variable instead.