From 400d9e0c0ff150347aa043209d11afce5337b72e Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Wed, 23 Jul 2014 14:47:16 +0400 Subject: [PATCH] Fix long/int cast errors --- libgrive/src/drive/State.cc | 4 ++-- libgrive/src/drive/State.hh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libgrive/src/drive/State.cc b/libgrive/src/drive/State.cc index cf0c30b..de53a88 100644 --- a/libgrive/src/drive/State.cc +++ b/libgrive/src/drive/State.cc @@ -257,8 +257,8 @@ void State::Read( const fs::path& filename ) void State::Write( const fs::path& filename ) const { Json last_sync ; - last_sync.Add( "sec", Json(m_last_sync.Sec() ) ); - last_sync.Add( "nsec", Json(m_last_sync.NanoSec() ) ); + last_sync.Add( "sec", Json( (int)m_last_sync.Sec() ) ); + last_sync.Add( "nsec", Json( (unsigned)m_last_sync.NanoSec() ) ); Json result ; result.Add( "last_sync", last_sync ) ; diff --git a/libgrive/src/drive/State.hh b/libgrive/src/drive/State.hh index 98cce39..af79f8d 100644 --- a/libgrive/src/drive/State.hh +++ b/libgrive/src/drive/State.hh @@ -78,7 +78,7 @@ private : private : ResourceTree m_res ; DateTime m_last_sync ; - long m_cstamp ; + int m_cstamp ; std::string m_dir ; std::vector m_unresolved ;