Skip to content

Commit c662a3e

Browse files
authored
Add NOLINT directive for static analysis (#204)
1 parent efa7de9 commit c662a3e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

include/OsqpEigen/Compat.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ inline OSQPCscMatrix* spalloc(OSQPInt m,
4949
OSQPInt n,
5050
OSQPInt nzmax)
5151
{
52+
// NOLINTBEGIN(clang-analyzer-unix.Malloc): no leak, ownership is with the callee via M
5253
OSQPCscMatrix* M = static_cast<OSQPCscMatrix*>(calloc(1, sizeof(OSQPCscMatrix))); /* allocate the OSQPCscMatrix struct */
5354
if (!M)
5455
{
@@ -95,6 +96,7 @@ inline OSQPCscMatrix* spalloc(OSQPInt m,
9596
OSQPEigen_OSQPCscMatrix_set_data(M, m, n, M_nnz, M_x, M_i, M_p);
9697

9798
return M;
99+
// NOLINTEND(clang-analyzer-unix.Malloc)
98100
}
99101

100102
inline void spfree(OSQPCscMatrix* M)

0 commit comments

Comments
 (0)