diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2014-07-02 12:59:53 +0200 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2014-07-02 13:15:27 +0200 |
commit | 2754abfe49755045b9f769f406366be4ec708d59 (patch) | |
tree | 3be830a6da67cbc69cbc5599404d860306373579 | |
parent | f710cf194a9f5045287061805f2933d178df914e (diff) |
SDK: fix gcc 4.9 warning
gcc 4.9 warns about uninitialized tctx. It doesn't seem to notice that
the code using it is not reached unless ISO8601StrToTimestamp()
succeeds and initializes the variable first.
Suppress the warning by initializing to zero first.
-rwxr-xr-x | src/DB_interfaces/api_db/dbapi.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/DB_interfaces/api_db/dbapi.cpp b/src/DB_interfaces/api_db/dbapi.cpp index de6a04b..8c92211 100755 --- a/src/DB_interfaces/api_db/dbapi.cpp +++ b/src/DB_interfaces/api_db/dbapi.cpp @@ -1231,7 +1231,7 @@ TSyError TDB_Api_Session::GetDBTime( TDB_Api_Str ¤tDBTime ) // No 'lineartime_t' available for standalone TSyError TDB_Api_Session::GetDBTime( lineartime_t ¤tDBTime, GZones* g ) { - timecontext_t tctx; + timecontext_t tctx = 0; TDB_Api_Str s; TSyError err= GetDBTime( s ); currentDBTime= 0; if (!err && !ISO8601StrToTimestamp ( s.c_str(), currentDBTime, tctx )) return DB_Error; |