]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commit
Fix 64-bit time_t in fprintf, printf (MSVC) 856/head
authorWolfgang Stöggl <c72578@yahoo.de>
Sun, 31 Dec 2017 13:38:29 +0000 (14:38 +0100)
committerWolfgang Stöggl <c72578@yahoo.de>
Sun, 31 Dec 2017 13:38:29 +0000 (14:38 +0100)
commit59d21dcdbd2eeb9781b690628415273e6c150c69
treef980f47df6db3bee8e7bd14e1e107f03402f73bd
parent1706b5d2e6d0387c452b47e2870c4771ab32df43
Fix 64-bit time_t in fprintf, printf (MSVC)

- In VS2005 and later, the default size for time_t is 64-bit, unless
  _USE_32BIT_TIME_T has been defined to use a 32-bit time_t ...

- Fixes MSVC compiler warnings:
  ./src\rrd_graph_helper.c(1465): warning C4477: 'fprintf' :
  format string '%li' requires an argument of type 'long',
  but variadic argument 1 has type 'time_t'

  ./src\rrd_lastupdate.c(83): warning C4477: 'printf' :
  format string '%10lu' requires an argument of type 'unsigned long',
  but variadic argument 1 has type 'time_t'

  ./src\rrd_tool.c(720): warning C4477: 'printf' : format string '%ld'
  requires an argument of type 'long', but variadic argument 1 has type
  'time_t'
  ./src\rrd_tool.c(724): warning C4477: 'printf' : format string '%ld'
  requires an argument of type 'long', but variadic argument 1 has type
  'time_t'
  ./src\rrd_tool.c(742): warning C4477: 'printf' : format string
  '%10lu' requires an argument of type 'unsigned long', but variadic
  argument 1 has type 'time_t'
src/rrd_graph_helper.c
src/rrd_lastupdate.c
src/rrd_tool.c