Skip to content

Conversation

@vvidic
Copy link

@vvidic vvidic commented Jun 24, 2017

Warning produced with GCC 7.1.0:

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));
    ~~~~~~~~~~~~~~~~~~~~~~~~

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));
    ~~~~~~~~~~~~~~~~~~~~~~~~
@dmuhamedagic
Copy link

Oh, yes, I missed the extra string. Thanks!

@dmuhamedagic dmuhamedagic merged commit 87a12cc into ClusterLabs:master Jun 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants