Bug 697076 - Fix some Clang warnings. r=luke

This commit is contained in:
Jan de Mooij 2011-10-26 11:50:40 +02:00
Родитель 1bc97aefb1
Коммит 380ed2b04a
5 изменённых файлов: 8 добавлений и 7 удалений

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

@ -1002,6 +1002,7 @@ void
rl_reset_terminal(p)
char *p;
{
(void)p;
}
void

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

@ -347,7 +347,7 @@ types::TypeFailure(JSContext *cx, const char *fmt, ...)
/* Always active, even in release builds */
JS_Assert(msgbuf, __FILE__, __LINE__);
*((int*)NULL) = 0; /* Should never be reached */
*((volatile int *)NULL) = 0; /* Should never be reached */
}
/////////////////////////////////////////////////////////////////////

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

@ -82,14 +82,14 @@ CrashInJS()
* We used to call DebugBreak() on Windows, but amazingly, it causes
* the MSVS 2010 debugger not to be able to recover a call stack.
*/
*((int *) NULL) = 123;
*((volatile int *) NULL) = 123;
exit(3);
#elif defined(__APPLE__)
/*
* On Mac OS X, Breakpad ignores signals. Only real Mach exceptions are
* trapped.
*/
*((int *) NULL) = 123; /* To continue from here in GDB: "return" then "continue". */
*((volatile int *) NULL) = 123; /* To continue from here in GDB: "return" then "continue". */
raise(SIGABRT); /* In case above statement gets nixed by the optimizer. */
#else
raise(SIGABRT); /* To continue from here in GDB: "signal 0". */

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

@ -877,5 +877,5 @@ SecurityWrapper<Base>::objectClassIs(JSObject *obj, ESClassValue classValue, JSC
return ret;
}
template class SecurityWrapper<Wrapper>;
template class SecurityWrapper<CrossCompartmentWrapper>;
template class js::SecurityWrapper<Wrapper>;
template class js::SecurityWrapper<CrossCompartmentWrapper>;

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

@ -66,14 +66,14 @@ void OS::Abort() {
* We used to call DebugBreak() on Windows, but amazingly, it causes
* the MSVS 2010 debugger not to be able to recover a call stack.
*/
*((int *) NULL) = 0;
*((volatile int *) NULL) = 0;
exit(3);
#elif defined(__APPLE__)
/*
* On Mac OS X, Breakpad ignores signals. Only real Mach exceptions are
* trapped.
*/
*((int *) NULL) = 0; /* To continue from here in GDB: "return" then "continue". */
*((volatile int *) NULL) = 0; /* To continue from here in GDB: "return" then "continue". */
raise(SIGABRT); /* In case above statement gets nixed by the optimizer. */
#else
raise(SIGABRT); /* To continue from here in GDB: "signal 0". */