Project

General

Profile

« Previous | Next » 

Revision 7f83fee7

Added by Nathan Scott over 13 years ago

  • ID 7f83fee764c68732a6ca5b1474b49228f77670c8

Use inttypes.h macros in libpcp to address Win32 build warnings.

Moving toward a warning free build on Windows, the main remaining issue
is the following class of problem:

events.c: In function '__pmDumpEventRecords':
events.c:120: warning: unknown conversion type character 'l' in format
events.c:120: warning: too many arguments for format
events.c:124: warning: unknown conversion type character 'l' in format
events.c:124: warning: too many arguments for format

googling suggests this is because the Windows printf implementation is
not conforming to the same standards as most others players (%llu and
%lld are the typical sources of the above warning). Evidentally, all
platforms do have inttypes.h which seems to be recommended for solving
this, Wikipedia states "ISO C99 includes the inttypes.h header file that
includes a number of macros for use in platform-independent printf coding"
in http://en.wikipedia.org/wiki/Printf#Format_placeholders ... this does
indeed address the problem.

  • added
  • modified
  • copied
  • renamed
  • deleted