Skip to content
This repository has been archived by the owner on Oct 12, 2020. It is now read-only.

fix gcc-8 format-truncation warning #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hongxu-jia
Copy link

While compiling with `-Werror=format-truncation=', it failed
[snip]
|super0.c:236:32: error: 'snprintf' output may be truncated
before the last format character [-Werror=format-truncation=]
| snprintf(nb, sizeof(nb), "%4d", d);
| ^
|super0.c:236:3: note: 'snprintf' output between 5 and 12 bytes
into a destination of size 11
| snprintf(nb, sizeof(nb), "%4d", d);
[snip]

Signed-off-by: Hongxu Jia [email protected]

While compiling with `-Werror=format-truncation=', it failed
[snip]
|super0.c:236:32: error: 'snprintf' output may be truncated
before the last format character [-Werror=format-truncation=]
|   snprintf(nb, sizeof(nb), "%4d", d);
|                                ^
|super0.c:236:3: note: 'snprintf' output between 5 and 12 bytes
into a destination of size 11
|   snprintf(nb, sizeof(nb), "%4d", d);
[snip]

Signed-off-by: Hongxu Jia <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant