Skip to content

Commit

Permalink
fix some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
facontidavide committed Apr 1, 2021
1 parent c17f216 commit 5b9c250
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tools/bt_log_cat.cpp
Expand Up @@ -21,13 +21,13 @@ int main(int argc, char* argv[])
}

fseek(file, 0L, SEEK_END);
const size_t length = ftell(file);
const size_t length = static_cast<size_t>(ftell(file));
fseek(file, 0L, SEEK_SET);
std::vector<char> buffer(length);
fread(buffer.data(), sizeof(char), length, file);
fclose(file);

const int bt_header_size = flatbuffers::ReadScalar<uint32_t>(&buffer[0]);
const auto bt_header_size = flatbuffers::ReadScalar<uint32_t>(&buffer[0]);

auto behavior_tree = Serialization::GetBehaviorTree(&buffer[4]);

Expand Down
6 changes: 3 additions & 3 deletions tools/bt_recorder.cpp
Expand Up @@ -20,8 +20,8 @@ static void CatchSignals(void)
action.sa_handler = s_signal_handler;
action.sa_flags = 0;
sigemptyset(&action.sa_mask);
sigaction(SIGINT, &action, NULL);
sigaction(SIGTERM, &action, NULL);
sigaction(SIGINT, &action, nullptr);
sigaction(SIGTERM, &action, nullptr);
}

int main(int argc, char* argv[])
Expand Down Expand Up @@ -57,7 +57,7 @@ int main(int argc, char* argv[])
zmq::message_t msg;
try
{
subscriber.recv(&update, 0);
subscriber.recv(update, zmq::recv_flags::none);
}
catch (zmq::error_t& e)
{
Expand Down

0 comments on commit 5b9c250

Please sign in to comment.