HomeClusterLabs Projects
Diffusion Booth 32234fb6310d

Fix GCC-7 warning on buffer size

Description

Fix GCC-7 warning on buffer size

ticket.c: In function ‘process_tickets’:
ticket.c:470:44: warning: ‘%s’ directive output may be truncated writing up to 63 bytes into a region of size 53 [-Wformat-truncation=]

snprintf(buff, sizeof(buff), "granted to %s",
                                         ^~

ticket.c:470:3: note: ‘snprintf’ output between 12 and 75 bytes into a destination of size 64

snprintf(buff, sizeof(buff), "granted to %s",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 site_string(tk->leader));
 ~~~~~~~~~~~~~~~~~~~~~~~~

Details

Provenance
Valentin Vidić <vvidic@valentin-vidic.from.hr>Authored on Jun 24 2017, 8:14 AM
GitHub <noreply@github.com>Committed on Jun 24 2017, 8:14 AM
Parents
rB766d61881b2c: Merge pull request #56 from ChrisKowalczyk/fix_build_add_working_directory
Branches
Unknown
Tags
Unknown

Event Timeline