[rtems commit] rtems: Fix RTEMS_MAXIMUM_PRIORITY define

Sebastian Huber sebh at rtems.org
Wed Feb 1 13:03:22 UTC 2017


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Feb  1 13:00:15 2017 +0100

rtems: Fix RTEMS_MAXIMUM_PRIORITY define

Cast the internal PRIORITY_MAXIMUM to the right type for a Classic API
task priority to avoid integer conversion warnings.

---

 cpukit/rtems/include/rtems/rtems/tasks.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/rtems/include/rtems/rtems/tasks.h b/cpukit/rtems/include/rtems/rtems/tasks.h
index 05f7ef3..88e4355 100644
--- a/cpukit/rtems/include/rtems/rtems/tasks.h
+++ b/cpukit/rtems/include/rtems/rtems/tasks.h
@@ -101,7 +101,7 @@ typedef uint32_t rtems_task_priority;
  *        want to ensure that a task does not executes during
  *        certain operations such as a system mode change.
  */
-#define RTEMS_MAXIMUM_PRIORITY      PRIORITY_MAXIMUM
+#define RTEMS_MAXIMUM_PRIORITY      ((rtems_task_priority) PRIORITY_MAXIMUM)
 
 /**
  *  The following constant is passed to rtems_task_set_priority when the




More information about the vc mailing list