[rtems commit] rtems: Deprecate use of _RTEMS_version

Sebastian Huber sebh at rtems.org
Wed May 6 06:02:29 UTC 2020


Module:    rtems
Branch:    master
Commit:    34b098edc5d89d3dd110baa42956105c8949b263
Changeset: http://git.rtems.org/rtems/commit/?id=34b098edc5d89d3dd110baa42956105c8949b263

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue May  5 14:37:30 2020 +0200

rtems: Deprecate use of _RTEMS_version

Close #3970.

---

 cpukit/include/rtems/system.h      | 9 ++++-----
 cpukit/sapi/src/getversionstring.c | 2 ++
 testsuites/sptests/spsize/size.c   | 2 ++
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/cpukit/include/rtems/system.h b/cpukit/include/rtems/system.h
index c728591..2fb5e8a 100644
--- a/cpukit/include/rtems/system.h
+++ b/cpukit/include/rtems/system.h
@@ -35,12 +35,11 @@ extern "C" {
 
 #ifndef ASM
 
-/**
- *  The following is the extern for the RTEMS version string.
- *
- *  @note The contents of this string are CPU specific.
+/*
+ * The use of this variable is deprecated, use rtems_get_version_string()
+ * instead.
  */
-extern const char _RTEMS_version[];
+extern RTEMS_DEPRECATED const char _RTEMS_version[];
 
 /**
  *  The following is the extern for the RTEMS copyright string.
diff --git a/cpukit/sapi/src/getversionstring.c b/cpukit/sapi/src/getversionstring.c
index 2222e9e..f3fada9 100644
--- a/cpukit/sapi/src/getversionstring.c
+++ b/cpukit/sapi/src/getversionstring.c
@@ -19,6 +19,8 @@
 #include "config.h"
 #endif
 
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
 #include <rtems.h>
 
 const char *rtems_get_version_string(void)
diff --git a/testsuites/sptests/spsize/size.c b/testsuites/sptests/spsize/size.c
index 578576c..d26e34f 100644
--- a/testsuites/sptests/spsize/size.c
+++ b/testsuites/sptests/spsize/size.c
@@ -18,6 +18,8 @@
 #include "config.h"
 #endif
 
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
 #include <rtems/config.h>
 #include <rtems/score/copyrt.h>
 #include <rtems/rtems/clock.h>



More information about the vc mailing list