Details
-
Bug
-
Status: Open (View Workflow)
-
Critical
-
Resolution: Unresolved
-
10.5, 10.6, 10.11, 11.2(EOL), 11.4, 11.5(EOL)
-
None
Description
Compilation failure caused by using the C API function sprintf() that marked as deprecated. The goal of this task is to fix found issues in order to be able to build server on MacOS Monterey. The scope of this task is very limited and it doesn't intend to replace all occurrences of sprintf () throughout the source code.
Attachments
Issue Links
- duplicates
-
MDEV-33714 sprintf deprecated on macOS, replace with snprintf
-
- Stalled
-
I think that the bug title is misleading and the current fix is incomplete. We should simply replace all use of the unsafe-by-design C90 library function sprintf() with the C99 library function snprintf(), which we have relied on at least starting with MariaDB Server 10.2. Please consider which one is more pleasant to read:
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif
#ifdef __clang__
#pragma clang diagnostic pop
or