Fixed Mac errors and warnings

git-svn-id: svn://10.0.0.236/trunk@75439 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
waldemar%netscape.com
2000-08-02 23:09:29 +00:00
parent 4a24980381
commit e2aaf776e5
12 changed files with 38 additions and 38 deletions

View File

@@ -158,7 +158,7 @@ namespace Debugger {
/*NOT_REACHED ("Instruction map is empty, waah.");*/
InstructionMap::iterator pos_iter =
iCode->mInstructionMap->upper_bound (pc - iCode->its_iCode->begin());
iCode->mInstructionMap->upper_bound (static_cast<uint32>(pc - iCode->its_iCode->begin()));
if (pos_iter != iCode->mInstructionMap->begin())
--pos_iter;

View File

@@ -114,7 +114,7 @@ JavaScript::Debugger::Shell jsd(world, stdin, JavaScript::stdOut,
JavaScript::stdOut, &ResolveFile);
#endif
static JSValue print(Context *cx, const JSValues &argv)
static JSValue print(Context *, const JSValues &argv)
{
size_t n = argv.size();
if (n > 1) { // the 'this' parameter is un-interesting
@@ -126,7 +126,7 @@ static JSValue print(Context *cx, const JSValues &argv)
return kUndefinedValue;
}
static JSValue dump(Context *cx, const JSValues &argv)
static JSValue dump(Context *, const JSValues &argv)
{
size_t n = argv.size();
if (n > 1) { // the 'this' parameter is un-interesting

View File

@@ -231,7 +231,7 @@ namespace JSClasses {
JSMethods::iterator end = mMethods.end();
for (JSMethods::iterator i = mMethods.begin(); i != end; i++) {
if (i->first == name) {
index = i - mMethods.begin();
index = static_cast<uint32>(i - mMethods.begin());
return true;
}
}

View File

@@ -99,7 +99,7 @@ using namespace JSTypes;
#endif
JSValue math_abs(Context *cx, const JSValues& argv)
static JSValue math_abs(Context *, const JSValues& argv)
{
if (argv.size() > 0) {
JSValue num = argv[1].toNumber();
@@ -112,7 +112,7 @@ JSValue math_abs(Context *cx, const JSValues& argv)
return kUndefinedValue;
}
JSValue math_acos(Context *cx, const JSValues& argv)
static JSValue math_acos(Context *, const JSValues& argv)
{
if (argv.size() > 0) {
JSValue num = argv[1].toNumber();
@@ -121,7 +121,7 @@ JSValue math_acos(Context *cx, const JSValues& argv)
return kUndefinedValue;
}
JSValue math_asin(Context *cx, const JSValues& argv)
static JSValue math_asin(Context *, const JSValues& argv)
{
if (argv.size() > 0) {
JSValue num = argv[1].toNumber();
@@ -130,7 +130,7 @@ JSValue math_asin(Context *cx, const JSValues& argv)
return kUndefinedValue;
}
JSValue math_atan(Context *cx, const JSValues& argv)
static JSValue math_atan(Context *, const JSValues& argv)
{
if (argv.size() > 0) {
JSValue num = argv[1].toNumber();
@@ -139,7 +139,7 @@ JSValue math_atan(Context *cx, const JSValues& argv)
return kUndefinedValue;
}
JSValue math_atan2(Context *cx, const JSValues& argv)
static JSValue math_atan2(Context *, const JSValues& argv)
{
if (argv.size() > 1) {
JSValue num1 = argv[1].toNumber();
@@ -149,7 +149,7 @@ JSValue math_atan2(Context *cx, const JSValues& argv)
return kUndefinedValue;
}
JSValue math_ceil(Context *cx, const JSValues& argv)
static JSValue math_ceil(Context *, const JSValues& argv)
{
if (argv.size() > 0) {
JSValue num = argv[1].toNumber();
@@ -167,7 +167,7 @@ struct MathFunctionEntry {
{ "asin", math_asin },
{ "atan", math_atan },
{ "atan2", math_atan2 },
{ "ceil", math_acos },
{ "ceil", math_ceil },
{ "acos", math_acos },
{ "acos", math_acos }
};

View File

@@ -45,7 +45,7 @@ using namespace Interpreter;
/********** Object Object Stuff **************************/
JSValue object_toString(Context *cx, const JSValues& argv)
static JSValue object_toString(Context *, const JSValues& argv)
{
if (argv.size() > 0) {
JSString *s = new JSString("[object ");
@@ -58,7 +58,7 @@ JSValue object_toString(Context *cx, const JSValues& argv)
return kUndefinedValue;
}
JSValue objectConstructor(Context *cx, const JSValues& argv)
static JSValue objectConstructor(Context *, const JSValues& argv)
{
ASSERT(argv.size() > 0);
JSValue theThis = argv[0];
@@ -108,13 +108,13 @@ void JSObject::initObjectObject(JSScope *g)
/********** Function Object Stuff **************************/
// An empty function that returns undefined
JSValue functionPrototypeFunction(Context *cx, const JSValues& argv)
static JSValue functionPrototypeFunction(Context *, const JSValues &)
{
return kUndefinedValue;
}
JSValue function_constructor(Context *cx, const JSValues& argv)
static JSValue function_constructor(Context *cx, const JSValues& argv)
{
// build a function from the arguments into the this.
ASSERT(argv.size() > 0);
@@ -129,16 +129,16 @@ JSValue function_constructor(Context *cx, const JSValues& argv)
return theThis;
}
JSValue function_toString(Context *cx, const JSValues& argv)
static JSValue function_toString(Context *, const JSValues &)
{
return JSValue(new JSString("function XXX() { }" ));
}
JSValue function_apply(Context *cx, const JSValues& argv)
static JSValue function_apply(Context *, const JSValues &)
{
// XXX
return kUndefinedValue;
}
JSValue function_call(Context *cx, const JSValues& argv)
static JSValue function_call(Context *, const JSValues &)
{
// XXX
return kUndefinedValue;

View File

@@ -420,7 +420,7 @@ namespace JSTypes {
typedef gc_allocator<JSFunction, traits> allocator;
public:
static void JSFunction::initFunctionObject(JSScope *g);
static void initFunctionObject(JSScope *g);
JSFunction(ICodeModule* iCode)
: JSObject(FunctionPrototypeObject),

View File

@@ -158,7 +158,7 @@ namespace Debugger {
/*NOT_REACHED ("Instruction map is empty, waah.");*/
InstructionMap::iterator pos_iter =
iCode->mInstructionMap->upper_bound (pc - iCode->its_iCode->begin());
iCode->mInstructionMap->upper_bound (static_cast<uint32>(pc - iCode->its_iCode->begin()));
if (pos_iter != iCode->mInstructionMap->begin())
--pos_iter;

View File

@@ -231,7 +231,7 @@ namespace JSClasses {
JSMethods::iterator end = mMethods.end();
for (JSMethods::iterator i = mMethods.begin(); i != end; i++) {
if (i->first == name) {
index = i - mMethods.begin();
index = static_cast<uint32>(i - mMethods.begin());
return true;
}
}

View File

@@ -99,7 +99,7 @@ using namespace JSTypes;
#endif
JSValue math_abs(Context *cx, const JSValues& argv)
static JSValue math_abs(Context *, const JSValues& argv)
{
if (argv.size() > 0) {
JSValue num = argv[1].toNumber();
@@ -112,7 +112,7 @@ JSValue math_abs(Context *cx, const JSValues& argv)
return kUndefinedValue;
}
JSValue math_acos(Context *cx, const JSValues& argv)
static JSValue math_acos(Context *, const JSValues& argv)
{
if (argv.size() > 0) {
JSValue num = argv[1].toNumber();
@@ -121,7 +121,7 @@ JSValue math_acos(Context *cx, const JSValues& argv)
return kUndefinedValue;
}
JSValue math_asin(Context *cx, const JSValues& argv)
static JSValue math_asin(Context *, const JSValues& argv)
{
if (argv.size() > 0) {
JSValue num = argv[1].toNumber();
@@ -130,7 +130,7 @@ JSValue math_asin(Context *cx, const JSValues& argv)
return kUndefinedValue;
}
JSValue math_atan(Context *cx, const JSValues& argv)
static JSValue math_atan(Context *, const JSValues& argv)
{
if (argv.size() > 0) {
JSValue num = argv[1].toNumber();
@@ -139,7 +139,7 @@ JSValue math_atan(Context *cx, const JSValues& argv)
return kUndefinedValue;
}
JSValue math_atan2(Context *cx, const JSValues& argv)
static JSValue math_atan2(Context *, const JSValues& argv)
{
if (argv.size() > 1) {
JSValue num1 = argv[1].toNumber();
@@ -149,7 +149,7 @@ JSValue math_atan2(Context *cx, const JSValues& argv)
return kUndefinedValue;
}
JSValue math_ceil(Context *cx, const JSValues& argv)
static JSValue math_ceil(Context *, const JSValues& argv)
{
if (argv.size() > 0) {
JSValue num = argv[1].toNumber();
@@ -167,7 +167,7 @@ struct MathFunctionEntry {
{ "asin", math_asin },
{ "atan", math_atan },
{ "atan2", math_atan2 },
{ "ceil", math_acos },
{ "ceil", math_ceil },
{ "acos", math_acos },
{ "acos", math_acos }
};

View File

@@ -45,7 +45,7 @@ using namespace Interpreter;
/********** Object Object Stuff **************************/
JSValue object_toString(Context *cx, const JSValues& argv)
static JSValue object_toString(Context *, const JSValues& argv)
{
if (argv.size() > 0) {
JSString *s = new JSString("[object ");
@@ -58,7 +58,7 @@ JSValue object_toString(Context *cx, const JSValues& argv)
return kUndefinedValue;
}
JSValue objectConstructor(Context *cx, const JSValues& argv)
static JSValue objectConstructor(Context *, const JSValues& argv)
{
ASSERT(argv.size() > 0);
JSValue theThis = argv[0];
@@ -108,13 +108,13 @@ void JSObject::initObjectObject(JSScope *g)
/********** Function Object Stuff **************************/
// An empty function that returns undefined
JSValue functionPrototypeFunction(Context *cx, const JSValues& argv)
static JSValue functionPrototypeFunction(Context *, const JSValues &)
{
return kUndefinedValue;
}
JSValue function_constructor(Context *cx, const JSValues& argv)
static JSValue function_constructor(Context *cx, const JSValues& argv)
{
// build a function from the arguments into the this.
ASSERT(argv.size() > 0);
@@ -129,16 +129,16 @@ JSValue function_constructor(Context *cx, const JSValues& argv)
return theThis;
}
JSValue function_toString(Context *cx, const JSValues& argv)
static JSValue function_toString(Context *, const JSValues &)
{
return JSValue(new JSString("function XXX() { }" ));
}
JSValue function_apply(Context *cx, const JSValues& argv)
static JSValue function_apply(Context *, const JSValues &)
{
// XXX
return kUndefinedValue;
}
JSValue function_call(Context *cx, const JSValues& argv)
static JSValue function_call(Context *, const JSValues &)
{
// XXX
return kUndefinedValue;

View File

@@ -420,7 +420,7 @@ namespace JSTypes {
typedef gc_allocator<JSFunction, traits> allocator;
public:
static void JSFunction::initFunctionObject(JSScope *g);
static void initFunctionObject(JSScope *g);
JSFunction(ICodeModule* iCode)
: JSObject(FunctionPrototypeObject),

View File

@@ -114,7 +114,7 @@ JavaScript::Debugger::Shell jsd(world, stdin, JavaScript::stdOut,
JavaScript::stdOut, &ResolveFile);
#endif
static JSValue print(Context *cx, const JSValues &argv)
static JSValue print(Context *, const JSValues &argv)
{
size_t n = argv.size();
if (n > 1) { // the 'this' parameter is un-interesting
@@ -126,7 +126,7 @@ static JSValue print(Context *cx, const JSValues &argv)
return kUndefinedValue;
}
static JSValue dump(Context *cx, const JSValues &argv)
static JSValue dump(Context *, const JSValues &argv)
{
size_t n = argv.size();
if (n > 1) { // the 'this' parameter is un-interesting