From ba982c0575515a8524d5044f928cd336303f807c Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sat, 6 Apr 2013 21:47:13 +1000 Subject: Clean up some compiler warnings. More to come. --- linden/indra/lscript/lscript_execute/lscript_execute.cpp | 11 +---------- linden/indra/lscript/lscript_execute/lscript_readlso.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 12 deletions(-) (limited to 'linden/indra/lscript/lscript_execute') diff --git a/linden/indra/lscript/lscript_execute/lscript_execute.cpp b/linden/indra/lscript/lscript_execute/lscript_execute.cpp index b2b54cd..7af407f 100644 --- a/linden/indra/lscript/lscript_execute/lscript_execute.cpp +++ b/linden/indra/lscript/lscript_execute/lscript_execute.cpp @@ -809,16 +809,7 @@ void LLScriptExecute::runInstructions(BOOL b_print, const LLUUID &id, // is there a fault? // if yes, print out message and exit S32 value = getVersion(); - S32 major_version = 0; - if (value == LSL2_VERSION1_END_NUMBER) - { - major_version = 1; - } - else if (value == LSL2_VERSION_NUMBER) - { - major_version = 2; - } - else + if ((value != LSL2_VERSION1_END_NUMBER) && (value != LSL2_VERSION_NUMBER)) { setFault(LSRF_VERSION_MISMATCH); } diff --git a/linden/indra/lscript/lscript_execute/lscript_readlso.cpp b/linden/indra/lscript/lscript_execute/lscript_readlso.cpp index 3b10cc6..05eb826 100644 --- a/linden/indra/lscript/lscript_execute/lscript_readlso.cpp +++ b/linden/indra/lscript/lscript_execute/lscript_readlso.cpp @@ -150,7 +150,9 @@ void LLScriptLSOParse::printGlobals(LLFILE *fp) // get offset to skip past name varoffset = global_v_offset; + // FIXME: Not actually used, perhaps there's a skip function? Or perhaps we really do need to skip past a name as the above comment suggests? offset = bytestream2integer(mRawData, global_v_offset); + offset = offset + 0; // get typeexport type = *(mRawData + global_v_offset++); @@ -268,8 +270,6 @@ void LLScriptLSOParse::printGlobalFunctions(LLFILE *fp) fprintf(fp, "[Function #%d] [0x%X] %s\n", function_number, orig_function_offset, name); fprintf(fp, "\tReturn Type: %s\n", LSCRIPTTypeNames[type]); type = *(mRawData + function_offset++); - S32 params; - params = 0; S32 pcount = 0; while (type) { @@ -362,7 +362,9 @@ void LLScriptLSOParse::printStates(LLFILE *fp) if (event_handlers & LSCRIPTStateBitField[k]) { temp_end = bytestream2integer(mRawData, read_ahead); + // FIXME onefang: Dummy is not actually used, but perhaps this is here to stop a warning? We need to stop another warning now. Some sort of skip might be better. dummy = bytestream2integer(mRawData, read_ahead); + dummy = dummy + 0; if ( (temp_end < opcode_end) &&(temp_end > event_offset)) { -- cgit v1.1