Bug 1236322 - Part 1: Annotate intentional switch fallthroughs to suppress -Wimplicit-fallthrough warnings in parser/. r=hsivonen

parser/html/nsHtml5Highlighter.cpp:572:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels

parser/htmlparser/nsScanner.cpp:425:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
parser/htmlparser/nsScanner.cpp:780:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
This commit is contained in:
Chris Peterson
2015-12-25 00:01:32 -07:00
parent dab3fbc2f4
commit 256e9f19bb
2 changed files with 6 additions and 1 deletions

View File

@@ -6,6 +6,7 @@
//#define __INCREMENTAL 1
#include "mozilla/Attributes.h"
#include "mozilla/DebugOnly.h"
#include "nsScanner.h"
@@ -422,6 +423,7 @@ nsresult nsScanner::SkipWhitespace(int32_t& aNewlinesSkipped) {
switch(theChar) {
case '\n':
case '\r': ++aNewlinesSkipped;
MOZ_FALLTHROUGH;
case ' ' :
case '\t':
{
@@ -777,6 +779,7 @@ nsresult nsScanner::ReadWhitespace(nsScannerIterator& aStart,
switch(theChar) {
case '\n':
case '\r': ++aNewlinesSkipped;
MOZ_FALLTHROUGH;
case ' ' :
case '\t':
{