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

            Bug ID: 71176
           Summary: trunk/fixincludes/fixincl.c:162: bad % specifier
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

trunk/fixincludes/fixincl.c:162]: (warning) %d in format string (no. 2)
requires 'int' but the argument type is 'size_t {aka unsigned long}'.

Source code is

    tSCC zFmt[] =
      "\
Processed %5d files containing %d bytes    \n\
Applying  %5d fixes to %d files\n\
Altering  %5d of them\n";

    fprintf (stderr, zFmt, process_ct, ttl_data_size, apply_ct,
             fixed_ct, altered_ct);

Suggest use %lu for size_t, not %d.

Reply via email to