Created
July 28, 2020 00:34
-
-
Save diego200052/48d5c7c805d20fd2da762b769b87ba00 to your computer and use it in GitHub Desktop.
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
# infer -- g++ test.cc | |
Capturing in make/cc mode... | |
/opt/infer-linux64-v0.17.0/lib/infer/facebook-clang-plugins/clang/install/bin/clang-8: /lib64/libtinfo.so.5: no version information available (required by /opt/infer-linux64-v0.17.0/lib/infer/facebook-clang-plugins/clang/install/bin/clang-8) | |
Found 1 source file to analyze in /root/pruebasInf/inferReport/infer-out | |
Analysis finished in 1.798ss | |
Found 1 issue | |
test.cc:8: error: UNINITIALIZED_VALUE | |
The value read from number1 was never initialized. | |
6. int number1 __attribute__((unused)) = 1; | |
7. int number2 __attribute__((unused)); | |
8. > cout<<"Number: " << number1; | |
9. } | |
10. | |
Summary of the reports | |
UNINITIALIZED_VALUE: 1 |
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
#include <iostream> | |
using namespace std; | |
void printNumber() { | |
int number1 __attribute__((unused)) = 1; | |
int number2 __attribute__((unused)); | |
cout<<"Number: " << number1; | |
} | |
int main() { | |
cout<<"\nHello World!\n"; | |
printNumber(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment