home keyliaran CLionProjects untitled2 main cpp 36 warning parameter i

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/home/keyliaran/CLionProjects/untitled2/main.cpp:3:36: warning: parameter 'a' is unused [misc-unused-parameters]
virtual void reimplementMe(int a) {}
^~
/*a*/
/home/keyliaran/CLionProjects/untitled2/main.cpp:3:36: note: FIX-IT applied suggested code changes
/home/keyliaran/CLionProjects/untitled2/main.cpp:6:28: warning: parameter 'a' is unused [misc-unused-parameters]
void reimplementMe(int a) override {}
^~
/*a*/
/home/keyliaran/CLionProjects/untitled2/main.cpp:6:28: note: FIX-IT applied suggested code changes
/home/keyliaran/CLionProjects/untitled2/main.cpp:14:5: warning: initializing non-owner 'void *' with a newly created 'gsl::owner<>' [cppcoreguidelines-owning-memory]
void *x = malloc(2);
^
/home/keyliaran/CLionProjects/untitled2/main.cpp:14:15: warning: do not manage memory manually; consider a container or a smart pointer [hicpp-no-malloc]
void *x = malloc(2);
^
/home/keyliaran/CLionProjects/untitled2/main.cpp:16:5: warning: Potential leak of memory pointed to by 'x' [clang-analyzer-unix.Malloc]
return 0;
^
/home/keyliaran/CLionProjects/untitled2/main.cpp:14:15: note: Memory is allocated
void *x = malloc(2);
^
/home/keyliaran/CLionProjects/untitled2/main.cpp:16:5: note: Potential leak of memory pointed to by 'x'
return 0;
^