1
0
UAHCode/CPE455/lab06/cppcheck-all.txt

49 lines
2.1 KiB
Plaintext
Raw Permalink Normal View History

2022-08-28 21:12:16 +00:00
ec3.cpp:55:5: style: Assignment of function parameter has no effect outside the function. [uselessAssignmentArg]
a = a + 1; // No side effect outside function
^
ec3.cpp:11:6: error: Array 'a[10]' accessed at index 10, which is out of bounds. [arrayIndexOutOfBounds]
a[10] = 0;
^
ec3.cpp:16:10: error: Array 'a[10]' accessed at index 10, which is out of bounds. [arrayIndexOutOfBounds]
a[k] = k;
^
ec3.cpp:62:0: error: Found a exit path from function with non-void return type that has missing return statement [missingReturn]
return false;
^
ec3.cpp:33:6: error: Null pointer dereference: x [nullPointer]
*x = 1;
^
ec3.cpp:32:14: note: Assignment 'x=0', assigned value is 0
int* x = 0;
^
ec3.cpp:33:6: note: Null pointer dereference
*x = 1;
^
ec3.cpp:29:6: error: Uninitialized variable: p [uninitvar]
*p = 5;
^
ec3.cpp:47:12: error: Memory is allocated but not initialized: r [uninitdata]
delete r;
^
ec3.cpp:23:14: style: Variable 'a[m]' is assigned a value that is never used. [unreadVariable]
a[m] = m;
^
ec3.cpp:43:12: style: Variable 'q' is assigned a value that is never used. [unreadVariable]
int* q = new int;
^
ec3.cpp:28:10: style: Variable 'p' is not assigned a value. [unassignedVariable]
int* p;
^
ec3.cpp:43:10: style: Variable 'q' is allocated memory that is never used. [unusedAllocatedMemory]
int* q = new int;
^
ec3.cpp:46:10: style: Variable 'r' is allocated memory that is never used. [unusedAllocatedMemory]
int* r = new int[4];
^
ec3.cpp:55:7: style: Variable 'a' is assigned a value that is never used. [unreadVariable]
a = a + 1; // No side effect outside function
^
ec3.cpp:53:0: style: The function 'f' is never used. [unusedFunction]
^