зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1302401 - Finds integer literals which are cast to bool. r=Waldo
MozReview-Commit-ID: DkzKx4FnVTV --HG-- extra : rebase_source : cac13e1cd9a2b794f0ec668ad84d8cade222213f
This commit is contained in:
Родитель
2678725c30
Коммит
32ebdc26d1
|
@ -3903,7 +3903,7 @@ BuildTypeName(JSContext* cx, JSObject* typeObj_)
|
|||
// of the rules for building C type declarations can be found at:
|
||||
// http://unixwiz.net/techtips/reading-cdecl.html
|
||||
TypeCode prevGrouping = CType::GetTypeCode(typeObj), currentGrouping;
|
||||
while (1) {
|
||||
while (true) {
|
||||
currentGrouping = CType::GetTypeCode(typeObj);
|
||||
switch (currentGrouping) {
|
||||
case TYPE_pointer: {
|
||||
|
|
|
@ -452,7 +452,7 @@ class ParseNode
|
|||
: pn_type(kind),
|
||||
pn_op(op),
|
||||
pn_arity(arity),
|
||||
pn_parens(0),
|
||||
pn_parens(false),
|
||||
pn_pos(0, 0),
|
||||
pn_next(nullptr)
|
||||
{
|
||||
|
@ -464,7 +464,7 @@ class ParseNode
|
|||
: pn_type(kind),
|
||||
pn_op(op),
|
||||
pn_arity(arity),
|
||||
pn_parens(0),
|
||||
pn_parens(false),
|
||||
pn_pos(pos),
|
||||
pn_next(nullptr)
|
||||
{
|
||||
|
|
|
@ -283,15 +283,15 @@ TraceLoggerGraph::~TraceLoggerGraph()
|
|||
// Make sure every start entry has a corresponding stop value.
|
||||
// We temporarily enable logging for this. Stop doesn't need any extra data,
|
||||
// so is safe to do even when we have encountered OOM.
|
||||
enabled = 1;
|
||||
enabled = true;
|
||||
while (stack.size() > 1)
|
||||
stopEvent(0);
|
||||
enabled = 0;
|
||||
enabled = false;
|
||||
}
|
||||
|
||||
if (!failed && !flush()) {
|
||||
fprintf(stderr, "TraceLogging: Couldn't write the data to disk.\n");
|
||||
enabled = 0;
|
||||
enabled = false;
|
||||
failed = true;
|
||||
}
|
||||
|
||||
|
@ -364,7 +364,7 @@ TraceLoggerGraph::startEvent(uint32_t id, uint64_t timestamp)
|
|||
if (tree.size() >= treeSizeFlushLimit() || !tree.ensureSpaceBeforeAdd()) {
|
||||
if (!flush()) {
|
||||
fprintf(stderr, "TraceLogging: Couldn't write the data to disk.\n");
|
||||
enabled = 0;
|
||||
enabled = false;
|
||||
failed = true;
|
||||
return;
|
||||
}
|
||||
|
@ -373,7 +373,7 @@ TraceLoggerGraph::startEvent(uint32_t id, uint64_t timestamp)
|
|||
|
||||
if (!startEventInternal(id, timestamp)) {
|
||||
fprintf(stderr, "TraceLogging: Failed to start an event.\n");
|
||||
enabled = 0;
|
||||
enabled = false;
|
||||
failed = true;
|
||||
return;
|
||||
}
|
||||
|
@ -462,7 +462,7 @@ TraceLoggerGraph::stopEvent(uint64_t timestamp)
|
|||
if (enabled && stack.lastEntry().active()) {
|
||||
if (!updateStop(stack.lastEntry().treeId(), timestamp)) {
|
||||
fprintf(stderr, "TraceLogging: Failed to stop an event.\n");
|
||||
enabled = 0;
|
||||
enabled = false;
|
||||
failed = true;
|
||||
return;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче