Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion task_03/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
int main() { return 0; }
int main() {
int *p = new int;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: Value stored to 'p' during its initialization is never read [clang-analyzer-deadcode.DeadStores]

  int *p = new int;
       ^
Additional context

task_03/src/main.cpp:1: Value stored to 'p' during its initialization is never read

  int *p = new int;
       ^

return 0;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: Potential leak of memory pointed to by 'p' [clang-analyzer-cplusplus.NewDeleteLeaks]

  return 0;
  ^
Additional context

task_03/src/main.cpp:1: Memory is allocated

  int *p = new int;
           ^

task_03/src/main.cpp:2: Potential leak of memory pointed to by 'p'

  return 0;
  ^

}