diff options
Diffstat (limited to 'indra/lscript/lscript_execute')
-rw-r--r-- | indra/lscript/lscript_execute/CMakeLists.txt | 3 | ||||
-rw-r--r-- | indra/lscript/lscript_execute/lscript_execute.cpp | 11 | ||||
-rw-r--r-- | indra/lscript/lscript_execute/lscript_readlso.cpp | 9 |
3 files changed, 7 insertions, 16 deletions
diff --git a/indra/lscript/lscript_execute/CMakeLists.txt b/indra/lscript/lscript_execute/CMakeLists.txt index 3a16ffdc01..49605982a8 100644 --- a/indra/lscript/lscript_execute/CMakeLists.txt +++ b/indra/lscript/lscript_execute/CMakeLists.txt @@ -10,6 +10,9 @@ include_directories( ${LLMATH_INCLUDE_DIRS} ${LSCRIPT_INCLUDE_DIRS} ) +include_directories(SYSTEM + ${LLCOMMON_SYSTEM_INCLUDE_DIRS} + ) set(lscript_execute_SOURCE_FILES llscriptresource.cpp diff --git a/indra/lscript/lscript_execute/lscript_execute.cpp b/indra/lscript/lscript_execute/lscript_execute.cpp index d79e9f8bde..b12d2e4a16 100644 --- a/indra/lscript/lscript_execute/lscript_execute.cpp +++ b/indra/lscript/lscript_execute/lscript_execute.cpp @@ -806,16 +806,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/indra/lscript/lscript_execute/lscript_readlso.cpp b/indra/lscript/lscript_execute/lscript_readlso.cpp index 35caa41ae1..8b41cb5a72 100644 --- a/indra/lscript/lscript_execute/lscript_readlso.cpp +++ b/indra/lscript/lscript_execute/lscript_readlso.cpp @@ -123,7 +123,7 @@ void LLScriptLSOParse::printRegisters(LLFILE *fp) void LLScriptLSOParse::printGlobals(LLFILE *fp) { // print out registers first - S32 offset, varoffset; + S32 varoffset; S32 ivalue; F32 fpvalue; LLVector3 vvalue; @@ -144,7 +144,7 @@ void LLScriptLSOParse::printGlobals(LLFILE *fp) // get offset to skip past name varoffset = global_v_offset; - offset = bytestream2integer(mRawData, global_v_offset); + bytestream2integer(mRawData, global_v_offset); // get typeexport type = *(mRawData + global_v_offset++); @@ -262,8 +262,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) { @@ -347,7 +345,6 @@ void LLScriptLSOParse::printStates(LLFILE *fp) read_ahead = event_jump_table; S32 temp_end; - S32 dummy; opcode_end = worst_case_opcode_end; @@ -356,7 +353,7 @@ void LLScriptLSOParse::printStates(LLFILE *fp) if (event_handlers & LSCRIPTStateBitField[k]) { temp_end = bytestream2integer(mRawData, read_ahead); - dummy = bytestream2integer(mRawData, read_ahead); + bytestream2integer(mRawData, read_ahead); if ( (temp_end < opcode_end) &&(temp_end > event_offset)) { |