rkdeveloptool icon indicating copy to clipboard operation
rkdeveloptool copied to clipboard

Change sprintf to snprintf

Open quanghd96 opened this issue 1 year ago • 3 comments

I found sprintf is deprecated now. So i can not build on some devices. I fixed it by changing sprintf to snprintf. It work fine!

main.cpp:90:3: error: '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. [-Werror,-Wdeprecated-declarations]
                sprintf(szText, "Tag Bad Block total %lld, current %lld", totalValue, currentValue);

Tested on Linux and MacOS

quanghd96 avatar Nov 05 '22 07:11 quanghd96