Skip to content

Commit

Permalink
Update sample.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
xls authored Nov 29, 2021
1 parent 6e900d7 commit e3d6a62
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sample/sample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ void local_analysis(int *p, int *q, bool cond){
q = nullptr;
std::swap(p, q);
*p = 42; // Null dereference

}

static int double_up = 0; // lets define this in another scope
Expand All @@ -135,7 +136,7 @@ int main(int argc, const char* argv[])
int uninitialized_value;
int shadowed = 5;
int unusedvariable = 0;

long unused_var = 0;
int mispell = 23; // bad speling behiend the keiboard
mispell++;

Expand Down

0 comments on commit e3d6a62

Please sign in to comment.