Bug 1442750 - Slience a few Clang-only warnings in SpiderMonkey. r=jorendorff

The changes in shell/js.cpp silence warnings about unreachable return
statements.

The constant being removed in testErrorInterceptor.cpp is unused.

--HG--
extra : rebase_source : 8f57e671265a82a3baeb9d74cf38711383239a76
This commit is contained in:
Jason Orendorff 2018-03-02 09:31:34 -06:00
Родитель 693efc04e8
Коммит 42e72ffaa9
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -8,8 +8,6 @@
namespace {
const double EXN_VALUE = 3.14;
static JS::PersistentRootedString gLatestMessage;
// An interceptor that stores the error in `gLatestMessage`.

Просмотреть файл

@ -719,7 +719,7 @@ GetLine(FILE* file, const char * prompt)
if (*t == '\n') {
/* Line was read. We remove '\n' and exit. */
*t = '\0';
return buffer;
break;
}
if (len + 1 == size) {
@ -733,7 +733,7 @@ GetLine(FILE* file, const char * prompt)
}
current = buffer + len;
} while (true);
return nullptr;
return buffer;
}
static bool
@ -7222,7 +7222,9 @@ WasmLoop(JSContext* cx, unsigned argc, Value* vp)
}
}
#ifdef __AFL_HAVE_MANUAL_CONTROL // to silence unreachable code warning
return true;
#endif
}
static const JSFunctionSpecWithHelp shell_functions[] = {