Skip to content

Commit f211a68

Browse files
committed
[RTOS] fix compilation warning
pragma push/pop/Ospace are only supported by ARM compiler. Change predefined marco from __arm__ to __CC_ARM. Warning messages are shown as below. [Warning] rt_CMSIS.c@1867: 1866:0: warning: ignoring #pragma push [-Wunknown-pragmas] ignoring #pragma Ospace [-Wunknown-pragmas] [Warning] rt_CMSIS.c@1884: 1866:0: warning: ignoring #pragma push [-Wunknown-pragmas] ignoring #pragma pop [-Wunknown-pragmas] Change-Id: Ife657b710d694449b30dc4b3150cd49c883fc080 Signed-off-by: Jun-Ru Chang <[email protected]>
1 parent 5a81e89 commit f211a68

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

libraries/rtos/rtx/TARGET_CORTEX_A/rt_CMSIS.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2066,7 +2066,7 @@ osStatus osMailPut (osMailQId queue_id, void *mail) {
20662066
return osMessagePut(*((void **)queue_id), (uint32_t)mail, 0);
20672067
}
20682068

2069-
#ifdef __arm__
2069+
#ifdef __CC_ARM
20702070
#pragma push
20712071
#pragma Ospace
20722072
#endif // __arm__
@@ -2084,6 +2084,6 @@ os_InRegs osEvent osMailGet (osMailQId queue_id, uint32_t millisec) {
20842084

20852085
return ret;
20862086
}
2087-
#ifdef __arm__
2087+
#ifdef __CC_ARM
20882088
#pragma pop
20892089
#endif // __arm__

libraries/rtos/rtx/TARGET_CORTEX_M/rt_CMSIS.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1862,7 +1862,7 @@ osStatus osMailPut (osMailQId queue_id, void *mail) {
18621862
return osMessagePut(*((void **)queue_id), (uint32_t)mail, 0);
18631863
}
18641864

1865-
#ifdef __arm__
1865+
#ifdef __CC_ARM
18661866
#pragma push
18671867
#pragma Ospace
18681868
#endif // __arm__
@@ -1880,6 +1880,6 @@ os_InRegs osEvent osMailGet (osMailQId queue_id, uint32_t millisec) {
18801880

18811881
return ret;
18821882
}
1883-
#ifdef __arm__
1883+
#ifdef __CC_ARM
18841884
#pragma pop
18851885
#endif // __arm__

0 commit comments

Comments
 (0)