bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
coverity_models.cpp
1
2// A simple model for the Coverity static checker
3// Update this and load it into Coverity to prevent false
4// positives due to code that's unusual - such as special
5// macros or functions that free memory (so delete or free
6// is not called when Coverity expects it to be).
7//
8// See https://scan.coverity.com/models#overriding for more
9// info about models
10
11void ff_destroy_std_args(void* x) {
12 __coverity_free__(x);
13}
14
15// I'm not sure why coverity doesn't pick this up, but make sure
16// that the _throw5 function is recognized as throwing an exception.
17// It may be that coverity does not handle template functions so
18// well...
19template < typename T, typename U, typename V, typename W, typename X >
20void _throw5 (const char *fname, int line, int numarg, const T & a1, const U & a2, const V & a3, const W & a4,
21 const X & a5)
22{
23 __coverity_panic__();
24}
25
26void throw3 (const char *, const char *, int)
27{
28 __coverity_panic__();
29}
30
31namespace libdap {
32
33class D4Attribute;
34
35// This model was intended to indicate that 'x' will not be leaked
36// memory because the D4Attributes dtor will clean it up. However,
37// this model confuses the scanner into thinking the code deletes
38// the pointer, so any code that uses 'x' after this call will generate
39// a High Priority issue. jhrg 11/16/17
40#if 0
41class D4Attributes {
42 void add_attribute_nocopy(D4Attribute *x)
43 {
44 __coverity_delete__(x);
45 }
46};
47#endif
48
49}