STMicroelectronics / STMems_Standard_C_drivers

Platform-independent drivers for STMicroelectronics MEMS motion and environmental sensors, based on standard C programming language.
BSD 3-Clause "New" or "Revised" License
729 stars 518 forks source link

Replace sprintf with snprintf #156

Closed Hadatko closed 1 month ago

Hadatko commented 1 year ago

Device part numbers

-

Summary

Brief explanation of the feature.

Hello, newer compilers are starting to complain related to usage of sprintf function (clang returning warning about deprecation). Their are suggesting to replace that call with snprintf. May you consider align your code?

Basic example

Motivation

'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.
avisconti commented 1 month ago

Fixed by faefa8d

Hadatko commented 1 month ago

Funny i was on training from ST at that time 😂