Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix new GCC 9 warning: #632

Merged
merged 1 commit into from Feb 26, 2019
Merged

Fix new GCC 9 warning: #632

merged 1 commit into from Feb 26, 2019

Conversation

marxin
Copy link
Contributor

@marxin marxin commented Feb 25, 2019

[ 874s] In function 'void* memcpy(void*, const void*, size_t)',
[ 874s] inlined from 'virtual String* Item_func_format::val_str_ascii(String*)' at /home/abuild/rpmbuild/BUILD/percona-xtrabackup-2.4.12/sql/item_strfunc.cc:3214:13:
[ 874s] /usr/include/bits/string_fortified.h:34:33: warning: 'void* __builtin_memcpy(void*, const void*, unsigned int)' writing 1 or more bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
[ 874s] 34 | return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));

It's analyzed here:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89350

[  874s] In function 'void* memcpy(void*, const void*, size_t)',
[  874s]     inlined from 'virtual String* Item_func_format::val_str_ascii(String*)' at /home/abuild/rpmbuild/BUILD/percona-xtrabackup-2.4.12/sql/item_strfunc.cc:3214:13:
[  874s] /usr/include/bits/string_fortified.h:34:33: warning: 'void* __builtin_memcpy(void*, const void*, unsigned int)' writing 1 or more bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
[  874s]    34 |   return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));

It's analyzed here:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89350
@gl-sergei
Copy link
Contributor

@marxin is this the only warning with GCC 9?

@marxin
Copy link
Contributor Author

marxin commented Feb 26, 2019

@marxin is this the only warning with GCC 9?

Yes and only on a i586 target.

Copy link
Contributor

@gl-sergei gl-sergei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. Thank you!

@gl-sergei gl-sergei merged commit 9357150 into percona:8.0 Feb 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants