> > This is a super small pull request, simple replace deprecated sprintf with snprintf
> > https://bitbucket.org/tmidas/manalyzer/pull-requests/9
>
> sprintf() is not deprecated and "char buf[256]; sprintf(buf, "%05d", 64-bit-int);" is safe, will never overflow.
>
> we could bulk-convert all these sprintf() to snprintf() but I would rather wait for this:
>
> https://en.cppreference.com/w/cpp/utility/format/format
>
> let me think on this for a bit.
>
> K.O.
I completely agree that the 64-bit int is safe and will never overflow. Doing a little digging, both clang and gcc don't raise warnings on x86_64 (even with -Wall -Wextra -Wpedantic), even when I give it a buffer impossibly small (two bytes). However I've narrowed down the depreciation warning comes from: MacOS
https://developer.apple.com/documentation/kernel/1441083-sprintf
I like the look of std::format, looks cleaner than string streams |