Bug #91520 GCC 8 warning in mysql_client_test.cc
| Submitted: | 2 Jul 2018 11:55 | Modified: | 2 Jul 2018 15:50 |
|---|---|---|---|
| Reporter: | Knut Anders Hatlen | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Compiling | Severity: | S3 (Non-critical) |
| Version: | 8.0.13 | OS: | Any |
| Assigned to: | CPU Architecture: | Any |
[2 Jul 2018 15:50]
Paul DuBois
Posted by developer: Fixed in 8.0.13. Code cleanup. No changelog entry needed.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.050 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: I see the following warning when I build MySQL with GCC 8.1 and -Og: /code/mysql/trunk/testclients/mysql_client_test.cc: In function ‘void test_mem_overun()’: /code/mysql/trunk/testclients/mysql_client_test.cc:7842:20: error: ‘%d’ directive writing between 1 and 11 bytes into a region of size 9 [-Werror=format-overflow=] sprintf(field, "c%d int", i); ^~~~~~~~~ /code/mysql/trunk/testclients/mysql_client_test.cc:7842:20: note: directive argument in the range [-2147483648, 999] /code/mysql/trunk/testclients/mysql_client_test.cc:7842:12: note: ‘sprintf’ output between 7 and 17 bytes into a destination of size 10 sprintf(field, "c%d int", i); ~~~~~~~^~~~~~~~~~~~~~~~~~~~~ cc1plus: all warnings being treated as errors How to repeat: Build MySQL.