[cogl/cogl-1.16] Don't enable deprecation warnings for internal API when building Cogl



commit a0ea2f3aca41e6e59ab2000544c04d5950b4dce9
Author: Neil Roberts <neil linux intel com>
Date:   Wed Jul 3 17:06:23 2013 +0100

    Don't enable deprecation warnings for internal API when building Cogl
    
    The 1.x branch needs to use some of the deprecated API internally in
    order to set up some deprecated state. This was causing a lot of
    annoying warnings so instead we'll just disable the deprecation
    attribute when COGL_COMPLIATION is defined.
    
    It probably wouldn't be a good idea to apply this to the 2.0 branch
    because at least for now we want to get warnings if we accidentally
    use deprecated API internally.
    
    Reviewed-by: Robert Bragg <robert linux intel com>

 cogl/cogl-macros.h |    2 +-
 cogl/cogl-types.h  |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/cogl/cogl-macros.h b/cogl/cogl-macros.h
index be072c9..a30cb90 100644
--- a/cogl/cogl-macros.h
+++ b/cogl/cogl-macros.h
@@ -35,7 +35,7 @@
  * They are only intended for internal use and should not be used by
  * other projects.
  */
-#ifdef COGL_DISABLE_DEPRECATION_WARNINGS
+#if defined(COGL_DISABLE_DEPRECATION_WARNINGS) || defined(COGL_COMPILATION)
 
 #define COGL_DEPRECATED
 #define COGL_DEPRECATED_FOR(f)
diff --git a/cogl/cogl-types.h b/cogl/cogl-types.h
index 227b7ec..57e0e29 100644
--- a/cogl/cogl-types.h
+++ b/cogl/cogl-types.h
@@ -99,7 +99,8 @@ typedef int CoglBool;
 #define COGL_GNUC_NULL_TERMINATED
 #endif
 
-#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
+#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) && \
+  !defined (COGL_COMPILATION)
 #define COGL_GNUC_DEPRECATED                       \
   __attribute__((__deprecated__))
 #else


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]