On Fri, Apr 29, 2016 at 7:54 AM, Gerald Squelart <squel...@gmail.com> wrote: > Now, for maximum defensiveness, shouldn't we go even further? > > How about: Make 'MOZ_MUST_USE' implicit for all functions/methods (except > void of course, probably methods returning T&, and maybe more as they come > up). > When a result is not needed somewhere, use the 'Unused << foo()' idiom. > And if a function's return is really not important, then mark it with > MOZ_MAY_IGNORE_RESULT (or similar).
This is a noble goal, but there is an enormous amount of code that would need to be modified to make this feasible. Perhaps if you exempted nsresult from MOZ_MUST_USE types. -Nathan _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform