ignore_warnings.h 1.1 KB

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
  3. *
  4. * Use of this source code is governed by a BSD-style license
  5. * that can be found in the LICENSE file in the root of the source
  6. * tree. An additional intellectual property rights grant can be found
  7. * in the file PATENTS. All contributing project authors may
  8. * be found in the AUTHORS file in the root of the source tree.
  9. */
  10. #ifndef RTC_BASE_SYSTEM_IGNORE_WARNINGS_H_
  11. #define RTC_BASE_SYSTEM_IGNORE_WARNINGS_H_
  12. #ifdef __clang__
  13. #define RTC_PUSH_IGNORING_WFRAME_LARGER_THAN() \
  14. _Pragma("clang diagnostic push") \
  15. _Pragma("clang diagnostic ignored \"-Wframe-larger-than=\"")
  16. #define RTC_POP_IGNORING_WFRAME_LARGER_THAN() _Pragma("clang diagnostic pop")
  17. #elif __GNUC__
  18. #define RTC_PUSH_IGNORING_WFRAME_LARGER_THAN() \
  19. _Pragma("GCC diagnostic push") \
  20. _Pragma("GCC diagnostic ignored \"-Wframe-larger-than=\"")
  21. #define RTC_POP_IGNORING_WFRAME_LARGER_THAN() _Pragma("GCC diagnostic pop")
  22. #else
  23. #define RTC_PUSH_IGNORING_WFRAME_LARGER_THAN()
  24. #define RTC_POP_IGNORING_WFRAME_LARGER_THAN()
  25. #endif
  26. #endif // RTC_BASE_SYSTEM_IGNORE_WARNINGS_H_