File: DisableWarnings.h

package info (click to toggle)
zeroc-ice 3.7.10-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 75,704 kB
  • sloc: cpp: 356,894; java: 226,081; cs: 98,312; javascript: 35,027; python: 28,716; objc: 27,050; php: 7,526; ruby: 7,190; yacc: 2,949; ansic: 2,469; xml: 1,589; lex: 1,241; makefile: 472; sh: 52
file content (44 lines) | stat: -rw-r--r-- 1,177 bytes parent folder | download | duplicates (5)
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
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//

#ifndef ICE_UTIL_DISABLEWARNINGS_H
#define ICE_UTIL_DISABLEWARNINGS_H

//
// This header file disables various compiler warnings that we don't want.
//
// IMPORTANT: Do *not* include this header file in another public header file!
//            Doing this may potentially disable the warnings in the source
//            code of our customers, which would be bad. Only include this
//            header file in Ice *source* files!
//

//
// Microsoft Visual C++
//
#if defined(_MSC_VER)
#    define _CRT_SECURE_NO_DEPRECATE 1  // C4996 '<C function>' was declared deprecated
#    pragma warning(disable:4996) // C4996 '<function>' was declared deprecated
#    pragma warning(disable:4800) // C4800 forcing value to bool 'true' or 'false' (performance warning)

#    if (_MSC_VER < 1700)
#       pragma warning(disable:4355) // C4355 'this' : used in base member initializer list
#    endif
#endif

//
// GCC
//
#if defined(__GNUC__)
#   pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif

//
// Clang
//
#if defined(__clang__)
#   pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif

#endif