aboutsummaryrefslogtreecommitdiff
path: root/applications/message_process
diff options
context:
space:
mode:
authorBhavik Patel <bhavik.patel@arm.com>2020-12-17 15:32:16 +0100
committerBhavik Patel <bhavik.patel@arm.com>2020-12-21 10:47:40 +0100
commit97906ebb4687efee3678f2cbaf01ce881573d849 (patch)
tree0df8d130a169597e4d838f83a0ccd54a93ef2a34 /applications/message_process
parentf946f6fe77260bf73db21b54514518e947ed2ea9 (diff)
downloadethos-u-core-software-97906ebb4687efee3678f2cbaf01ce881573d849.tar.gz
MLBEDSW-3728 Resolve compiler warnings
Change-Id: I6245d4fa6cf32c9edb05f52bb07e1d7b6a1c17fe
Diffstat (limited to 'applications/message_process')
-rw-r--r--applications/message_process/src/message_process.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/applications/message_process/src/message_process.cc b/applications/message_process/src/message_process.cc
index 9c0fc84..13ed8c4 100644
--- a/applications/message_process/src/message_process.cc
+++ b/applications/message_process/src/message_process.cc
@@ -139,7 +139,8 @@ void QueueImpl::cleanHeader() const {
void QueueImpl::cleanHeaderData() const {
#if defined(__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
SCB_CleanDCache_by_Addr(reinterpret_cast<uint32_t *>(&queue.header), sizeof(queue.header));
- SCB_CleanDCache_by_Addr(reinterpret_cast<uint32_t *>(queue.data), queue.header.size);
+ uintptr_t queueDataPtr = reinterpret_cast<uintptr_t>(&queue.data[0]);
+ SCB_CleanDCache_by_Addr(reinterpret_cast<uint32_t *>(queueDataPtr & ~3), queue.header.size + (queueDataPtr & 3));
#endif
}
@@ -152,7 +153,9 @@ void QueueImpl::invalidateHeader() const {
void QueueImpl::invalidateHeaderData() const {
#if defined(__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
SCB_InvalidateDCache_by_Addr(reinterpret_cast<uint32_t *>(&queue.header), sizeof(queue.header));
- SCB_InvalidateDCache_by_Addr(reinterpret_cast<uint32_t *>(queue.data), queue.header.size);
+ uintptr_t queueDataPtr = reinterpret_cast<uintptr_t>(&queue.data[0]);
+ SCB_InvalidateDCache_by_Addr(reinterpret_cast<uint32_t *>(queueDataPtr & ~3),
+ queue.header.size + (queueDataPtr & 3));
#endif
}