On 2016/09/22 5:56, Daniel Holbert wrote:
On 09/21/2016 12:48 PM, ISHIKAWA,chiaki wrote:
In the following URL about coding style,
--- begin quote ---
if (NS_WARN_IF(somethingthatshouldbetrue)) {

if (NS_WARN_IF(NS_FAILED(rv))) {
  return rv;

--- end quote ----

I am not a native speaker of English, but shouldn't the variable name in
the first if-statement example be
|somethingthatshouldNOTbetrue| instead of |somethingthatshouldbetrue|?

You're very right!  I've fixed it to say "somethingthatshouldbefalse"

Thank you for fixing the issue so quickly.

If so, Japanese, Chinese and Russian translation ought to be changed as

I am not qualified to fix those. I'm hoping you & others can take care
of that, perhaps! :)

I am not sure how to alert the translation contributors. Does anyone know how?

I may have found a few code fragments that may have been miswritten due
to misunderstanding.

Yikes! Please file bugs on those. Hopefully they are just cases of of us
accidentally warning in the wrong condition, rather than us actually
behaving incorrectly.

The particular issue I was struggling with turned out to be NOT the warning in the wrong condition, but the failure to use the return value of NS_WARN_IF, and I am not sure if I got it right now that I re-read the developer page :-( Bug 1304504 - Check the return value of GetIntPref() properly or an initialized bogus value may be used

I was confused to no end when I read the original coding guideline page.
Thank you again for the quick fix. I hope future developers won't be confused any longer :-)

dev-platform mailing list

Reply via email to