Closed Bug 1297655 Opened 8 years ago Closed 7 years ago

Misleading indentation in rbnf.cpp

Categories

(Core :: JavaScript: Internationalization API, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: nical, Assigned: Sylvestre)

References

Details

Triggers gcc6's -Wmisleading-indentation, here: http://searchfox.org/mozilla-central/rev/b38dbd1378cea4ae83bbc8a834cdccd02bbc5347/intl/icu/source/i18n/rbnf.cpp#321 The if and while blocks should be braced, but more importantly the return statement should be on a new line. This does not look like an actual bug but most of the -Wmisleading-indentation warnings I've come across so far appear to be genuine bugs so we need to be able to build gecko without this warning popping up.
Flags: needinfo?(jwalden+bmo)
Blocks: 1297639
Ooh, there's -Wmisleading-indentation? So now we can get rid of godawful single-statement bracing! \o/ We don't locally patch ICU without going through upstream first -- or, for simple enough changes, at least at the same time. File a ticket https://ssl.icu-project.org/trac/newticket with a patch to move the return onto a new line and note that the current code fails this new warning, and I imagine they'll take it in fairly short order. This is simple enough, so we can add the patch to intl/icu-patches and to intl/update-icu.sh to automatically apply it (and as important, to track our set of local patches to ICU) while the ticket is pending.
Flags: needinfo?(jwalden+bmo)
Assignee: nobody → sledru
Not really a bug, or at least not our bug. Closing.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
Status: RESOLVED → VERIFIED
Resolution: INVALID → FIXED
You need to log in before you can comment on or make changes to this bug.