Hi all,
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.
Attached patch gives us a clean libpcp build (and importantly, correctly
typed printf's on all platforms) ... does anyone object to this approach
though? I've checked Win32, Linux, FreeBSD, Mac ... I think all will be
OK with this (not sure about Solaris, but would expect it to be OK too).
cheers.
--
Nathan
warnings.patch
Description: Text Data
|