Skip to content

Commit

Permalink
Revert "base: prevent -Warray-bounds warnings in memcpy_cpu"
Browse files Browse the repository at this point in the history
This reverts commit 3d6c22d.
  • Loading branch information
chelmuth committed Dec 4, 2024
1 parent c686e4f commit 4b3df5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions repos/base/include/cpu/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ namespace Genode {
* \param size number of bytes to copy
*
* \return number of bytes not copied
*
* The compiler attribute is needed to prevent -Warray-bound warnings
* with gcc 12.3.
*/
__attribute((optimize("no-tree-loop-distribute-patterns")))
inline size_t memcpy_cpu(void * dst, const void * src, size_t size)
{
using word_t = unsigned long;
Expand Down
4 changes: 2 additions & 2 deletions repos/base/include/util/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ namespace Genode {
/**
* Return length of null-terminated string in bytes
*/
__attribute((optimize("no-tree-loop-distribute-patterns")))
__attribute((optimize("no-tree-loop-distribute-patterns")))
inline size_t strlen(const char *s)
{
size_t res = 0;
Expand Down Expand Up @@ -281,7 +281,7 @@ namespace Genode {
* generation of a 'memset()' call in the 'while' loop
* with gcc 10.
*/
__attribute((optimize("no-tree-loop-distribute-patterns")))
__attribute((optimize("no-tree-loop-distribute-patterns")))
inline void *memset(void *dst, uint8_t i, size_t size)
{
using word_t = unsigned long;
Expand Down

0 comments on commit 4b3df5c

Please sign in to comment.