Closed WavyEbuilder closed 3 weeks ago
I'm guessing the result of bp_sys::write is being ignored as we are at an oom state anyway?
It's ignored because the connection will be closed regardless (yes, due to OOM) and there's no meaningful way to handle an error at this point.
In some other cases return values from system calls are ignored because they are used in contexts where they can't realistically fail.
This is so far just removing false positives. If the warnings are bothering you, just disable them when compiling. Sorry, but I don't really want the churn of adding a load of workarounds to silence warnings which are different from compiler to compiler (and version to version) anyway. I would prefer if you just close this unless there are genuine errors that need fixing.
By all means add (void)
casts in any new code, but it's not worth going through and adding lots of them now.
Makes sense, understandable to not add the baggage. I'll close this based on this, thanks for the feedback. :)
Marked as draft for now as there are probably some things that need discussing first. Fixes a few warnings when building with GCC.
For this warning:
I'm guessing the result of bp_sys::write is being ignored as we are at an oom state anyway? I wanted to confirm that before adding a comment, and if that is a case, should I add an explanatory comment explaining why we are throwing away the result of the function?