mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-07-05 19:30:07 +08:00

src/cprogressbar.cxx: In member function 'virtual void NXWidgets::CProgressBar::drawContents(NXWidgets::CGraphicsPort*)': Error: src/cprogressbar.cxx:185:22: error: '%d' directive writing between 1 and 8 bytes into a region of size 6 [-Werror=format-overflow=] 185 | sprintf(text, "%d%%", (100 * m_value) / (m_maximumValue - m_minimumValue)); | ^~ src/cprogressbar.cxx:185:21: note: directive argument in the range [-3276800, 3276800] 185 | sprintf(text, "%d%%", (100 * m_value) / (m_maximumValue - m_minimumValue)); | ^~~~~~ src/cprogressbar.cxx:185:14: note: 'sprintf' output between 3 and 10 bytes into a destination of size 6 185 | sprintf(text, "%d%%", (100 * m_value) / (m_maximumValue - m_minimumValue)); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>