-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unused libraries from the linking phase
Dummy file with errors Change coverity options
- Loading branch information
1 parent
629e63c
commit 41cade3
Showing
4 changed files
with
44 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include <vector> | ||
#include <iostream> | ||
|
||
void my_function_with_errors() { | ||
{ | ||
std::vector<int> a = { 1, 2, 3 }; | ||
auto b = std::move(a); | ||
|
||
// Use after move | ||
std::cout << a.size(); | ||
} | ||
|
||
{ | ||
int* b = new int(5); | ||
delete b; | ||
|
||
// Use after free | ||
std::cout << *b; | ||
} | ||
} |
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