Skip to content

Commit

Permalink
ZIR-165: address a couple of minor compiler warnings (#30)
Browse files Browse the repository at this point in the history
* change type specifier from %llu to %zu when printing size_t (fixes -Wformat)

* remove unused var definition (fixes -Wunused-but-set-variable)
  • Loading branch information
mars-risc0 authored Sep 11, 2024
1 parent b017ed2 commit de89e10
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion zirgen/Conversions/Typing/ZhlComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,6 @@ void LoweringImpl::gen(GlobalOp global, ComponentBuilder& cb) {
}

Value LoweringImpl::lookup(Value component, StringRef member) {
Value originalComponent = component;
auto componentType = Zhlt::getComponentType(ctx);
while (component.getType() && component.getType() != componentType) {
ArrayRef<ZStruct::FieldInfo> fields;
Expand Down
2 changes: 1 addition & 1 deletion zirgen/dsl/examples/Fp.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ static void log_impl(std::string& format, const Val* x) {
if (isU32) {
printf("%*x", len, u32val);
} else {
printf("[%llu, %llu, %llu, %llu]", vals[0], vals[1], vals[2], vals[3]);
printf("[%zu, %zu, %zu, %zu]", vals[0], vals[1], vals[2], vals[3]);
}
p++;
}
Expand Down

0 comments on commit de89e10

Please sign in to comment.