https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89312

            Bug ID: 89312
           Summary: snprintf warning is unparsable and not confusing
           Product: gcc
           Version: 7.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: martin at netbsd dot org
  Target Milestone: ---

Gcc 7 has a new warning:

partman.c:1908:12: error: ' (' directive output may be truncated writing 2
bytes into a region of size between 1 and 255 [-Werror=format-truncation=]
         "%s (%s, %s-%d)",
            ^~

I am not a native speaker so this may be a lanugage barrirer, but I completely
fail to parse what it is trying to tell me here.

Obviously as I am using snprintf I am aware that truncation of the output could
happen (and happy with it). There is no point in gcc warning about this
(different to cases like strncpy truncation). The function is standard defined
and safe, why warn at all here?

Reply via email to