Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix 2 compiler warnings #1736

Merged
merged 3 commits into from
Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/Conversion/ONNXToKrnl/PerfectHash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ class Utilities {

// Adaptation of 32-bit FNV for int64_t values.
static inline uint32_t hash(uint32_t hval, int64_t val) {
char str[20];
sprintf(str, "%lld", (long long)val);

return hash(hval, std::string(str));
return hash(hval, std::to_string(val));
}

// Extracts the keys of the given map.
Expand Down
4 changes: 3 additions & 1 deletion src/Transform/ONNX/ConvOpt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ struct ConvOptONNXToONNXPass
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(ConvOptONNXToONNXPass)

ConvOptONNXToONNXPass() = default;
ConvOptONNXToONNXPass(const ConvOptONNXToONNXPass &pass) {}
ConvOptONNXToONNXPass(const ConvOptONNXToONNXPass &pass)
: mlir::PassWrapper<ConvOptONNXToONNXPass,
OperationPass<func::FuncOp>>() {}

StringRef getArgument() const override { return "convopt-onnx"; }

Expand Down
4 changes: 3 additions & 1 deletion src/Transform/ONNX/Decompose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,9 @@ struct DecomposeONNXToONNXPass
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(DecomposeONNXToONNXPass)

DecomposeONNXToONNXPass() = default;
DecomposeONNXToONNXPass(const DecomposeONNXToONNXPass &pass) {}
DecomposeONNXToONNXPass(const DecomposeONNXToONNXPass &pass)
: mlir::PassWrapper<DecomposeONNXToONNXPass,
OperationPass<func::FuncOp>>() {}

StringRef getArgument() const override { return "decompose-onnx"; }

Expand Down