-
Notifications
You must be signed in to change notification settings - Fork 408
/
Copy pathvtr_coverity_model.cpp
58 lines (52 loc) · 1.71 KB
/
vtr_coverity_model.cpp
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
* Coverity modeling file for VTR
*
* The model file is uses special __coverity_*__() commands
* to suppress false positives.
*
* We use this primarily to suppress warnings about some special
* memory/pointer manipulations used in VPR.
*
*
*/
/*
* From rout_common.c
*
* These functions do 'unusual' pointer manimulations while freeing,
* which cause coverity to report errors. In reality these are
* safe if used correctly.
*/
struct t_rt_node;
void free_timing_driven_route_structs(float *pin_criticality, int *sink_order,
t_rt_node ** rt_node_of_sink) {
__coverity_free__(pin_criticality);
__coverity_free__(sink_order);
__coverity_free__(rt_node_of_sink);
}
static struct s_heap **heap;
void free_route_structs() {
__coverity_free__(heap);
}
/*
* From libarchfpga/util.c
*
* The free_matrix*() functions offset the passed pointers before
* freeing to match the block originally allocated by the alloc_matrix*() function.
* The alloc_matrix*() functions originally offset the pointers to respected the
* use specified index ranges.
*/
void free_matrix(void *vptr, int nrmin, int nrmax, int ncmin, size_t elsize) {
__coverity_free__(vptr);
}
void free_matrix3(void *vptr, int nrmin, int nrmax, int ncmin, int ncmax,
int ndmin, size_t elsize) {
__coverity_free__(vptr);
}
void free_matrix4(void *vptr, int nrmin, int nrmax, int ncmin, int ncmax,
int ndmin, int ndmax, int nemin, size_t elsize) {
__coverity_free__(vptr);
}
void free_matrix5(void *vptr, int nrmin, int nrmax, int ncmin, int ncmax,
int ndmin, int ndmax, int nemin, int nemax, int nfmin, size_t elsize) {
__coverity_free__(vptr);
}