[rtems commit] interr.h: Fix gcc 12 warning
Joel Sherrill
joel at rtems.org
Fri Aug 19 20:46:12 UTC 2022
Module: rtems
Branch: master
Commit: df3fa4e0056aa46a4323ccc06fdffef1e1ffe721
Changeset: http://git.rtems.org/rtems/commit/?id=df3fa4e0056aa46a4323ccc06fdffef1e1ffe721
Author: Ryan Long <ryan.long at oarcorp.com>
Date: Tue Aug 16 11:59:09 2022 -0500
interr.h: Fix gcc 12 warning
The warning that this fixes states that "ISO C restricts enumerator values to
range of 'int'."
Updates #4662
---
cpukit/include/rtems/score/interr.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/cpukit/include/rtems/score/interr.h b/cpukit/include/rtems/score/interr.h
index d3fb370ec3..0616220040 100644
--- a/cpukit/include/rtems/score/interr.h
+++ b/cpukit/include/rtems/score/interr.h
@@ -38,6 +38,8 @@
#ifndef _RTEMS_SCORE_INTERR_H
#define _RTEMS_SCORE_INTERR_H
+#include <limits.h>
+
#include <rtems/score/cpu.h>
/**
@@ -175,7 +177,7 @@ typedef enum {
* This enum value ensures that the enum type needs at least 32-bits for
* architectures with short enums.
*/
- RTEMS_FATAL_SOURCE_LAST = 0xffffffff
+ RTEMS_FATAL_SOURCE_LAST = INT_MAX
} Internal_errors_Source;
/**
More information about the vc
mailing list