-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not check if address is 0/NULL/nullptr
The compiler (GCC and Clang) will report that comparing address of an object to 0/NULL/nullptr will always be false. The address is not the same as pointer. The following errors are reported by GCC (6.0.0, r233941): L1Trigger/GlobalCaloTrigger/plugins/L1GctEmulator.cc:130:9: error: the compiler can assume that the address of 'c' will never be NULL [-Werror=address] L1Trigger/GlobalCaloTrigger/plugins/L1GctPrintLuts.cc:159:9: error: the compiler can assume that the address of 'c' will never be NULL [-Werror=address] L1Trigger/GlobalCaloTrigger/test/gctTestFunctions.cc:55:12: error: the compiler can assume that the address of 'c' will never be NULL [-Werror=address] L1Trigger/GlobalCaloTrigger/test/L1GctTest.cc:207:12: error: the compiler can assume that the address of 'c' will never be NULL [-Werror=address] L1Trigger/L1TGlobal/src/L1TMenuEditor/xsd/cxx/tree/elements.hxx:380:21: error: the compiler can assume that the address of 'x' will never be NULL [-Werror=address] Signed-off-by: David Abdurachmanov <David.Abdurachmanov@cern.ch>
- Loading branch information
David Abdurachmanov
authored and
David Abdurachmanov
committed
Mar 7, 2016
1 parent
5cd610a
commit ff3d04c
Showing
5 changed files
with
1 addition
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters