mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 17:31:13 +03:00
examples: gcc8 fixes for -Werror=format-truncation
Fixes below issues: tm1637.cxx:69:29: error: "%2d%02d" directive output may be truncated writing between 5 and 15 bytes into a destination of size 5 [-Werror=format-truncation=] snprintf(myTime, 5, "%2d%02d", (hour + timezone + 24) % 24, min); jhd1313m1.c:65:49: error: '%d' directive output may be truncated writing between 1 and 10 bytes into a region of size 8 [-Werror=format-truncation=] snprintf(str, sizeof(str), "Hello World %d", ndx); Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:

committed by
Mihai Tudor Panu

parent
07a9af07fe
commit
6ae7e9125b
@ -51,7 +51,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
int ndx = 0;
|
||||
char str[20];
|
||||
char str[23];
|
||||
uint8_t rgb[7][3] = {
|
||||
{0xd1, 0x00, 0x00},
|
||||
{0xff, 0x66, 0x22},
|
||||
|
Reference in New Issue
Block a user