Skip to content

Commit 58a8f6d

Browse files
committed
core:siwigsm:Ignore GCC warning strncpy overlap
Signed-off-by: Ajay Bhargav <[email protected]>
1 parent 80a8293 commit 58a8f6d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cores/siwigsm/WString.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,8 @@ void String::remove(unsigned int index){
692692
remove(index, (unsigned int)-1);
693693
}
694694

695+
#pragma GCC diagnostic push
696+
#pragma GCC diagnostic ignored "-Wrestrict"
695697
void String::remove(unsigned int index, unsigned int count){
696698
if (index >= len) { return; }
697699
if (count <= 0) { return; }
@@ -701,6 +703,7 @@ void String::remove(unsigned int index, unsigned int count){
701703
strncpy(writeTo, buffer + index + count,len - index);
702704
buffer[len] = 0;
703705
}
706+
#pragma GCC diagnostic pop
704707

705708
void String::toLowerCase(void)
706709
{

0 commit comments

Comments
 (0)