-
Notifications
You must be signed in to change notification settings - Fork 10
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
add #[must_use] new_call function to show warning #30
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A small nitpick.
examples/brainfuck/src/main.rs
Outdated
@@ -107,6 +107,7 @@ fn codegen<'a, 'ctx>(ops: &[Op], context: &'a gccjit::Context<'ctx>) -> bool { | |||
let mut current_block = brainf_main.new_block("entry_block"); | |||
// now we have to zero out the giant buffer we just allocated on the stack. | |||
let zero_access = context.new_array_access(None, array.to_rvalue(), context.new_rvalue_zero(int_ty)); | |||
// a call to context.new_call will give us warning |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would only keep this comment, so please remove the others.
And please edit the comment to something like this:
// a call to context.new_call will give us warning | |
// A function call that is done for its side effects must be sent to add_eval. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright
@antoyo these changes has been push as requested |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another nitpick :) .
I can merge after you fix it.
Thanks a lot!
examples/brainfuck/src/main.rs
Outdated
@@ -172,11 +173,13 @@ fn codegen<'a, 'ctx>(ops: &[Op], context: &'a gccjit::Context<'ctx>) -> bool { | |||
} | |||
Op::Input => { | |||
let access = context.new_array_access(None, array.to_rvalue(), memory_ptr.to_rvalue()); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this new line and the others below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright
@antoyo new line remove |
oh, really, |
@antoyo space remove |
Thanks for your contribution. |
@mubarak23: Also, please do not ping me as I get a notification from GitHub so I already know you pushed your changes :) . |
No description provided.