Gazebo Common

API Reference

5.5.1
gz/common/SuppressWarning.hh
Go to the documentation of this file.
1/*
2 * Copyright (C) 2017 Open Source Robotics Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17
18#ifndef GZ_COMMON_SUPPRESSWARNING_HH_
19#define GZ_COMMON_SUPPRESSWARNING_HH_
20
21#include <gz/utils/SuppressWarning.hh>
22
23#pragma message("gz-common SuppressWarning is deprecated, use gz-utils")
24// These macros have been moved to gz-utils so they may be more broadly used.
25// The implementations are aliases to those implementations and are deprecated
26// in gz-common5 and are to be removed in gz-common6
27
28// This header contains cross-platform macros for suppressing warnings. Please
29// only use these macros responsibly when you are certain that the compiler is
30// producing a warning that is not applicable to the specific instance. Do not
31// use these macros to ignore legitimate warnings, even if you may find them
32// irritating.
33
34/*
35 * Usage example:
36 *
37 * SomeClass* ptr = CreatePtr();
38 * GZ_COMMON_WARN_IGNORE__DELETE_NON_VIRTUAL_DESTRUCTOR
39 * delete ptr;
40 * GZ_COMMON_WARN_RESUME__DELETE_NON_VIRTUAL_DESTRUCTOR
41 *
42 */
43
44// Be sure to call the GZ_COMMON_WARN_RESUME__XXXXX macro at the end of the
45// block of code where the warning suppression is needed. Otherwise, you might
46// inadvertently suppress legitimate warnings.
47
48// ---- List of available suppressions ----
49
56#define IGN_COMMON_WARN_IGNORE__DELETE_NON_VIRTUAL_DESTRUCTOR \
57 GZ_UTILS_WARN_IGNORE__NON_VIRTUAL_DESTRUCTOR
58
59#define IGN_COMMON_WARN_RESUME__DELETE_NON_VIRTUAL_DESTRUCTOR \
60 GZ_UTILS_WARN_RESUME__NON_VIRTUAL_DESTRUCTOR
61
62
68#define IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING \
69 GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING
70
71#define IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING \
72 GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING
73
74#endif