libs
libuavcan
libuavcan
tools
coverity_scan_model.cpp
Go to the documentation of this file.
1
/*
2
* Coverity Scan model.
3
*
4
* - A model file can't import any header files.
5
* - Therefore only some built-in primitives like int, char and void are
6
* available but not wchar_t, NULL etc.
7
* - Modeling doesn't need full structs and typedefs. Rudimentary structs
8
* and similar types are sufficient.
9
* - An uninitialized local pointer is not an error. It signifies that the
10
* variable could be either NULL or have some data.
11
*
12
* Coverity Scan doesn't pick up modifications automatically. The model file
13
* must be uploaded by an admin in the analysis settings of
14
* https://scan.coverity.com/projects/1513
15
*/
16
17
namespace
std
18
{
19
typedef
unsigned
long
size_t
;
20
}
21
22
namespace
uavcan
23
{
24
25
void
handleFatalError
(
const
char
* msg)
26
{
27
__coverity_panic__();
28
}
29
30
template
<std::
size_t
PoolSize, std::
size_t
BlockSize>
31
class
PoolAllocator
32
{
33
public
:
34
void
*
allocate
(
std::size_t
size)
35
{
36
return
__coverity_alloc__(size);
37
}
38
39
void
deallocate
(
const
void
* ptr)
40
{
41
__coverity_free__(ptr);
42
}
43
};
44
45
}
uavcan::PoolAllocator::deallocate
void deallocate(const void *ptr)
Definition:
coverity_scan_model.cpp:39
std::size_t
unsigned long size_t
Definition:
coverity_scan_model.cpp:19
uavcan::PoolAllocator::allocate
void * allocate(std::size_t size)
Definition:
coverity_scan_model.cpp:34
std
uavcan::handleFatalError
UAVCAN_EXPORT void handleFatalError(const char *msg)
Definition:
uc_error.cpp:20
uavcan
Definition:
libuavcan/libuavcan/include/uavcan/build_config.hpp:204
uavcan_communicator
Author(s):
autogenerated on Fri Dec 13 2024 03:10:02