Martin Sebor <msebor at gcc dot> changed:

           What    |Removed                     |Added
           Keywords|                            |diagnostic
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2016-09-23
                 CC|                            |msebor at gcc dot
           Assignee|unassigned at gcc dot      |msebor at gcc dot
     Ever confirmed|0                           |1
      Known to fail|                            |7.0

--- Comment #1 from Martin Sebor <msebor at gcc dot> ---
Unfortunately, even though it seems like the if statement with the strlen call
should help, the length range information isn't available to the warning pass. 
The warning can, however, be avoided by constraining the length of the string
argument output by specifying the precision in the directive like so:

  sprintf(foo, "zz%.4s", s.buf);

Please let me know if this isn't sufficient to resolve the problem report.

Reply via email to