1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4  * License, v. 2.0. If a copy of the MPL was not distributed with this
5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 
7 /*
8 Coverity model file in order to avoid false-positive
9 */
10 
11 // In Bug 1248897 we've seen that Coverity thinks that json-cpp allocates
12 // memmory for the strings that are used as indexes, this is wrong and this
13 // model of CZString fixes this.
14 namespace Json {
15 class Value {
16  private:
17   class CZString {
18    private:
19     char const* cstr_;
20 
21    public:
~CZString()22     ~CZString() {
23       // Don't do anything since most of the time cstr_ only stores address of
24       // str
25       __coverity_escape__(static_cast<void*>(cstr_));
26     }
27   };
28 };
29 }  // namespace Json
30