зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1220035 - Fix -Wimplicit-fallthrough warnings in xpcom. r=mccr8
xpcom/base/nsDebugImpl.cpp:458:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels xpcom/ds/nsCheapSets.h:139:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels xpcom/ds/nsPersistentProperties.cpp:232:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels xpcom/ds/nsVariant.cpp:360:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels xpcom/ds/nsVariant.cpp:766:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels xpcom/ds/nsVariant.cpp:1658:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels xpcom/ds/nsVariant.cpp:1661:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels xpcom/glue/nsTextFormatter.cpp:355:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels xpcom/glue/nsTextFormatter.cpp:362:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels xpcom/io/nsWildCard.cpp:85:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels xpcom/io/nsWildCard.cpp:401:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
This commit is contained in:
Родитель
d32bb30926
Коммит
4cbe614b32
|
@ -433,6 +433,7 @@ NS_DebugBreak(uint32_t aSeverity, const char* aStr, const char* aExpr,
|
|||
nsTraceRefcnt::WalkTheStack(stderr);
|
||||
#endif // !defined(MOZILLA_XPCOMRT_API)
|
||||
// Fall through to abort
|
||||
MOZ_FALLTHROUGH;
|
||||
|
||||
case NS_ASSERT_ABORT:
|
||||
Abort(buf.buffer);
|
||||
|
@ -607,4 +608,3 @@ NS_ABORT_OOM(size_t aSize)
|
|||
#endif
|
||||
MOZ_CRASH();
|
||||
}
|
||||
|
||||
|
|
|
@ -135,7 +135,8 @@ nsCheapSet<EntryType>::Put(const KeyType aVal)
|
|||
mUnion.table = table;
|
||||
mState = MANY;
|
||||
}
|
||||
// Fall through.
|
||||
MOZ_FALLTHROUGH;
|
||||
|
||||
case MANY:
|
||||
mUnion.table->PutEntry(aVal);
|
||||
return NS_OK;
|
||||
|
|
|
@ -227,7 +227,7 @@ nsPropertiesParser::ParseValueCharacter(char16_t aChar, const char16_t* aCur,
|
|||
aTokenStart = aCur + 1;
|
||||
break;
|
||||
}
|
||||
// no break
|
||||
MOZ_FALLTHROUGH;
|
||||
|
||||
case '\r':
|
||||
// we're done! We have a key and value
|
||||
|
|
|
@ -356,7 +356,8 @@ CloneArray(uint16_t aInType, const nsIID* aInIID,
|
|||
if (aOutIID) {
|
||||
*aOutIID = *aInIID;
|
||||
}
|
||||
// fall through...
|
||||
MOZ_FALLTHROUGH;
|
||||
|
||||
case nsIDataType::VTYPE_INTERFACE: {
|
||||
memcpy(*aOutValue, aInValue, allocSize);
|
||||
|
||||
|
@ -759,7 +760,7 @@ nsDiscriminatedUnion::ToString(nsACString& aOutString) const
|
|||
case nsIDataType::VTYPE_WSTRING_SIZE_IS:
|
||||
case nsIDataType::VTYPE_WCHAR:
|
||||
NS_ERROR("ToString being called for a string type - screwy logic!");
|
||||
// fall through...
|
||||
MOZ_FALLTHROUGH;
|
||||
|
||||
// XXX We might want stringified versions of these... ???
|
||||
|
||||
|
@ -1654,10 +1655,12 @@ nsDiscriminatedUnion::Traverse(nsCycleCollectionTraversalCallback& aCb) const
|
|||
NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(aCb, "mData[i]");
|
||||
aCb.NoteXPCOMChild(*p);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -351,14 +351,14 @@ cvt_f(SprintfState* aState, double aDouble, int aWidth, int aPrec,
|
|||
break;
|
||||
case 'E':
|
||||
exp = 'E';
|
||||
// no break
|
||||
MOZ_FALLTHROUGH;
|
||||
case 'e':
|
||||
numdigits = aPrec + 1;
|
||||
mode = 2;
|
||||
break;
|
||||
case 'G':
|
||||
exp = 'E';
|
||||
// no break
|
||||
MOZ_FALLTHROUGH;
|
||||
case 'g':
|
||||
if (aPrec == 0) {
|
||||
aPrec = 1;
|
||||
|
|
|
@ -81,7 +81,7 @@ _valid_subexp(const T* aExpr, T aStop1, T aStop2)
|
|||
return INVALID_SXP;
|
||||
}
|
||||
++tld;
|
||||
/* fall through */
|
||||
MOZ_FALLTHROUGH;
|
||||
case '*':
|
||||
case '?':
|
||||
case '$':
|
||||
|
@ -397,7 +397,7 @@ _shexp_match(const T* aStr, const T* aExpr, bool aCaseInsensitive,
|
|||
return ABORTED;
|
||||
case '\\':
|
||||
++y;
|
||||
/* fall through */
|
||||
MOZ_FALLTHROUGH;
|
||||
default:
|
||||
if (aCaseInsensitive) {
|
||||
if (::upper(aStr[x]) != ::upper(aExpr[y])) {
|
||||
|
@ -414,7 +414,6 @@ _shexp_match(const T* aStr, const T* aExpr, bool aCaseInsensitive,
|
|||
return (aStr[x] ? NOMATCH : MATCH);
|
||||
}
|
||||
|
||||
|
||||
template<class T>
|
||||
static int
|
||||
ns_WildCardMatch(const T* aStr, const T* aXp, bool aCaseInsensitive)
|
||||
|
|
Загрузка…
Ссылка в новой задаче