Summary: | In Vt102Emulation snprintf truncation warnings while compiling | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | Ahmad Samir <a.samirh78> |
Component: | general | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mglb |
Priority: | NOR | ||
Version: | master | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/konsole/847b72358d6c5371e7c8119c7081139112ced728 | Version Fixed In: | |
Sentry Crash Report: |
Description
Ahmad Samir
2018-05-22 13:06:05 UTC
Looking at the code this warning should always be there (first build with gcc 8?). It is also irrevelant, unless someone uses 8-digit-long terminal width/height. Increasing the buffer size to 27 will solve the problem. I'll fix this (In reply to Mariusz Glebocki from comment #1) > Looking at the code this warning should always be there (first build with > gcc 8?). First time I see that warning, could have been there before > It is also irrevelant, unless someone uses 8-digit-long terminal > width/height. OK, good to know; I wasn't sure if it were important or not so I filed a bug to track the issue / get it looked at. [...] Regards. Git commit 847b72358d6c5371e7c8119c7081139112ced728 by Kurt Hindenburg, on behalf of Mariusz Glebocki. Committed on 23/05/2018 at 23:42. Pushed by hindenburg into branch 'master'. Silence -Wformat-truncation warnings Summary: Add a few bytes to a small arrays on stack in order to make compiler happy. Those warnings are invalid in this context (as long as terminal width and height are not larger than 8-digits-long number). Test Plan: * Build Konsole with GCC 8 and `-Wformat-truncation` flag Expected result: no format-truncation warnings Actual result: three format-truncation warnings appear Reviewers: #konsole, hindenburg Reviewed By: #konsole, hindenburg Subscribers: hindenburg, konsole-devel, #konsole Tags: #konsole Differential Revision: https://phabricator.kde.org/D13080 M +2 -2 src/Vt102Emulation.cpp https://commits.kde.org/konsole/847b72358d6c5371e7c8119c7081139112ced728 |