Skip to content

Commit

Permalink
part-3
Browse files Browse the repository at this point in the history
  • Loading branch information
walkalone20 committed May 5, 2024
1 parent b7148e7 commit e780ea9
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion paddle/common/enforce.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ std::string GetCurrentTraceBackString(bool for_signal) {
#if !defined(_WIN32) && !defined(PADDLE_WITH_MUSL)
static constexpr int TRACE_STACK_LIMIT = 100;

std::array<void*, TRACE_STACK_LIMIT> call_stack;
std::array<void*, TRACE_STACK_LIMIT> call_stack = {};
auto size = backtrace(call_stack.data(), TRACE_STACK_LIMIT);
auto symbols = backtrace_symbols(call_stack.data(), size);
Dl_info info;
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/framework/data_feed.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1657,7 +1657,7 @@ bool MultiSlotFileInstantDataFeed::Preprocess(const std::string& filename) {
"Fail to open file: %s in MultiSlotFileInstantDataFeed.",
filename.c_str()));

struct stat sb;
struct stat sb = {};
fstat(fd_, &sb);
end_ = static_cast<size_t>(sb.st_size);

Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/inference/tensorrt/convert/transpose_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class TransposeOpConverter : public OpConverter {
axis[i]--;
}
}
nvinfer1::Permutation perm;
nvinfer1::Permutation perm = {};
for (int i = 0; i < dims; i++) {
int j = engine_->with_dynamic_shape() ? i : i + 1;
perm.order[i] = axis[j];
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/platform/init.cc
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ void DisableSignalHandler() {
#ifndef _WIN32
for (const auto &SignalErrorString : SignalErrorStrings) {
int signal_number = SignalErrorString.signal_number;
struct sigaction sig_action;
struct sigaction sig_action = {};
memset(&sig_action, 0, sizeof(sig_action));
sigemptyset(&sig_action.sa_mask);
sig_action.sa_handler = SIG_DFL;
Expand Down
2 changes: 1 addition & 1 deletion test/cpp/phi/kernels/test_cpu_vec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace phi {
namespace tests {

inline double GetCurrentUS() {
struct timeval time;
struct timeval time = {};
gettimeofday(&time, nullptr);
return 1e+6 * time.tv_sec + time.tv_usec; // NOLINT
}
Expand Down

0 comments on commit e780ea9

Please sign in to comment.