Ensuring warning-free build w/ new GCCs #356

This commit is contained in:
Martin Dvorak 2019-09-18 06:46:39 +02:00
parent a97bd9f88a
commit 5a16a9fe42
3 changed files with 6 additions and 3 deletions

1
.gitignore vendored
View file

@ -28,3 +28,4 @@ hstr
hh
*.pro.user
test/hstr-unit-tests
/hstr.pro.user*

View file

@ -14,9 +14,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
. ./debian-env.sh
# How to: https://mentors.debian.net/intro-maintainers
# Check section "How to upload packages to mentors.debian.net?"
# GPG key mgmt: https://mentors.debian.net/my
cd ../..
dput mentors hstr*source.changes
# eof

View file

@ -824,7 +824,8 @@ void print_selection_row(char* text, int y, int width, char* pattern)
char screenLine[CMDLINE_LNG];
char buffer[CMDLINE_LNG];
hstr_strelide(buffer, text, width>2?width-2:0);
snprintf(screenLine, width, " %s", buffer);
int size = snprintf(screenLine, width, " %s", buffer);
if(size < 0) screenLine[0]=0;
mvprintw(y, 0, "%s", screenLine); clrtoeol();
if(pattern && strlen(pattern)) {