mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 04:30:33 +00:00
Fix warning (missing initializer for struct members
This commit is contained in:
parent
482558aa27
commit
24d431f74e
@ -166,7 +166,7 @@ void ControlThread::init()
|
||||
else
|
||||
{
|
||||
// fill agnss_ref_time_
|
||||
struct tm tm = {};
|
||||
struct tm tm = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
if (strptime(ref_time_str.c_str(), "%d/%m/%Y %H:%M:%S", &tm) != nullptr)
|
||||
{
|
||||
agnss_ref_time_.d_tv_sec = timegm(&tm);
|
||||
@ -876,7 +876,7 @@ std::vector<std::pair<int, Gnss_Satellite>> ControlThread::get_visible_sats(time
|
||||
std::vector<unsigned int> visible_gps;
|
||||
std::vector<unsigned int> visible_gal;
|
||||
std::shared_ptr<PvtInterface> pvt_ptr = flowgraph_->get_pvt();
|
||||
struct tm tstruct = {};
|
||||
struct tm tstruct = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
char buf[80];
|
||||
tstruct = *gmtime(&rx_utc_time);
|
||||
strftime(buf, sizeof(buf), "%d/%m/%Y %H:%M:%S ", &tstruct);
|
||||
|
@ -142,7 +142,7 @@ std::string TcpCmdInterface::status(const std::vector<std::string> &commandLine
|
||||
&course_over_ground_deg,
|
||||
&UTC_time) == true)
|
||||
{
|
||||
struct tm tstruct = {};
|
||||
struct tm tstruct = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
char buf1[80];
|
||||
tstruct = *gmtime(&UTC_time);
|
||||
strftime(buf1, sizeof(buf1), "%d/%m/%Y %H:%M:%S", &tstruct);
|
||||
@ -173,7 +173,7 @@ std::string TcpCmdInterface::hotstart(const std::vector<std::string> &commandLin
|
||||
if (commandLine.size() > 5)
|
||||
{
|
||||
// Read commandline time parameter
|
||||
struct tm tm = {};
|
||||
struct tm tm = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
if (strptime(commandLine.at(1).c_str(), "%d/%m/%Y %H:%M:%S", &tm) == nullptr)
|
||||
{
|
||||
response = "ERROR: time parameter malformed\n";
|
||||
@ -219,7 +219,7 @@ std::string TcpCmdInterface::warmstart(const std::vector<std::string> &commandLi
|
||||
{
|
||||
std::string tmp_str;
|
||||
// Read commandline time parameter
|
||||
struct tm tm = {};
|
||||
struct tm tm = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
tmp_str = commandLine.at(1) + commandLine.at(2);
|
||||
if (strptime(commandLine.at(1).c_str(), "%d/%m/%Y %H:%M:%S", &tm) == nullptr)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user