aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra')
-rw-r--r--linden/indra/llcommon/llsdserialize.cpp5
-rw-r--r--linden/indra/llmath/llvolume.cpp5
-rw-r--r--linden/indra/llmessage/llhttpassetstorage.cpp3
-rw-r--r--linden/indra/llrender/llfont.cpp2
-rw-r--r--linden/indra/llrender/llgl.cpp13
-rw-r--r--linden/indra/llrender/llimagegl.cpp4
-rw-r--r--linden/indra/llui/llfunctorregistry.h2
-rw-r--r--linden/indra/llwindow/GL/glh_extensions.h4
-rw-r--r--linden/indra/lscript/lscript_execute/lscript_execute.cpp11
-rw-r--r--linden/indra/lscript/lscript_execute/lscript_readlso.cpp6
10 files changed, 25 insertions, 30 deletions
diff --git a/linden/indra/llcommon/llsdserialize.cpp b/linden/indra/llcommon/llsdserialize.cpp
index e2be922..f648c5c 100644
--- a/linden/indra/llcommon/llsdserialize.cpp
+++ b/linden/indra/llcommon/llsdserialize.cpp
@@ -1447,9 +1447,12 @@ S32 LLSDBinaryFormatter::format(const LLSD& data, std::ostream& ostr, U32 option
1447 } 1447 }
1448 1448
1449 case LLSD::TypeUUID: 1449 case LLSD::TypeUUID:
1450 {
1450 ostr.put('u'); 1451 ostr.put('u');
1451 ostr.write((const char*)(&(data.asUUID().mData)), UUID_BYTES); 1452 U8 *value = data.asUUID().mData;
1453 ostr.write((const char*)(&value), UUID_BYTES);
1452 break; 1454 break;
1455 }
1453 1456
1454 case LLSD::TypeString: 1457 case LLSD::TypeString:
1455 ostr.put('s'); 1458 ostr.put('s');
diff --git a/linden/indra/llmath/llvolume.cpp b/linden/indra/llmath/llvolume.cpp
index 618048c..63869ea 100644
--- a/linden/indra/llmath/llvolume.cpp
+++ b/linden/indra/llmath/llvolume.cpp
@@ -4438,14 +4438,9 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build)
4438 S32 max_s = volume->getProfile().getTotal(); 4438 S32 max_s = volume->getProfile().getTotal();
4439 S32 max_t = volume->getPath().mPath.size(); 4439 S32 max_t = volume->getPath().mPath.size();
4440 4440
4441 // S32 i;
4442 S32 num_vertices = 0, num_indices = 0;
4443 S32 grid_size = (profile.size()-1)/4; 4441 S32 grid_size = (profile.size()-1)/4;
4444 S32 quad_count = (grid_size * grid_size); 4442 S32 quad_count = (grid_size * grid_size);
4445 4443
4446 num_vertices = (grid_size+1)*(grid_size+1);
4447 num_indices = quad_count * 4;
4448
4449 LLVector3& min = mExtents[0]; 4444 LLVector3& min = mExtents[0];
4450 LLVector3& max = mExtents[1]; 4445 LLVector3& max = mExtents[1];
4451 4446
diff --git a/linden/indra/llmessage/llhttpassetstorage.cpp b/linden/indra/llmessage/llhttpassetstorage.cpp
index 49dbdbd..fcdb354 100644
--- a/linden/indra/llmessage/llhttpassetstorage.cpp
+++ b/linden/indra/llmessage/llhttpassetstorage.cpp
@@ -743,7 +743,8 @@ LLAssetRequest* LLHTTPAssetStorage::findNextRequest(LLAssetStorage::request_list
743 request_list_t::iterator running_end = running.end(); 743 request_list_t::iterator running_end = running.end();
744 744
745 request_list_t::iterator pending_iter = pending.begin(); 745 request_list_t::iterator pending_iter = pending.begin();
746 request_list_t::iterator pending_end = pending.end(); 746 // FIXME onefang - I assume this was being used to speed up the for(), but this is just a quick pass to get rid of warnings. Try to understand it later.
747 //request_list_t::iterator pending_end = pending.end();
747 // Loop over all pending requests until we miss finding it in the running list. 748 // Loop over all pending requests until we miss finding it in the running list.
748 for (; pending_iter != pending.end(); ++pending_iter) 749 for (; pending_iter != pending.end(); ++pending_iter)
749 { 750 {
diff --git a/linden/indra/llrender/llfont.cpp b/linden/indra/llrender/llfont.cpp
index 5ee3929..1cad593 100644
--- a/linden/indra/llrender/llfont.cpp
+++ b/linden/indra/llrender/llfont.cpp
@@ -535,6 +535,8 @@ void LLFont::renderGlyph(const U32 glyph_index) const
535 int error = FT_Load_Glyph(mFTFace, glyph_index, FT_LOAD_DEFAULT ); 535 int error = FT_Load_Glyph(mFTFace, glyph_index, FT_LOAD_DEFAULT );
536 llassert(!error); 536 llassert(!error);
537 537
538 // Work around the compiler warning about error not being used when llassert() is compiled out.
539 error = error + 0;
538 error = FT_Render_Glyph(mFTFace->glyph, gFontRenderMode); 540 error = FT_Render_Glyph(mFTFace->glyph, gFontRenderMode);
539 541
540 mRenderGlyphCount++; 542 mRenderGlyphCount++;
diff --git a/linden/indra/llrender/llgl.cpp b/linden/indra/llrender/llgl.cpp
index 4a4ff1b..b57a562 100644
--- a/linden/indra/llrender/llgl.cpp
+++ b/linden/indra/llrender/llgl.cpp
@@ -383,11 +383,10 @@ bool LLGLManager::initGL()
383 if (mGLVendor.substr(0,4) == "ATI ") 383 if (mGLVendor.substr(0,4) == "ATI ")
384 { 384 {
385 mGLVendorShort = "ATI"; 385 mGLVendorShort = "ATI";
386 BOOL mobile = FALSE; 386 // This is not used anywhere.
387 if (mGLRenderer.find("MOBILITY") != std::string::npos) 387 //BOOL mobile = FALSE;
388 { 388 //if (mGLRenderer.find("MOBILITY") != std::string::npos)
389 mobile = TRUE; 389 // mobile = TRUE;
390 }
391 mIsATI = TRUE; 390 mIsATI = TRUE;
392 391
393#if LL_WINDOWS && !LL_MESA_HEADLESS 392#if LL_WINDOWS && !LL_MESA_HEADLESS
@@ -1014,8 +1013,8 @@ void assert_glerror()
1014void clear_glerror() 1013void clear_glerror()
1015{ 1014{
1016 // Create or update texture to be used with this data 1015 // Create or update texture to be used with this data
1017 GLenum error; 1016 //GLenum error;
1018 error = glGetError(); 1017 /*error =*/ glGetError();
1019} 1018}
1020 1019
1021/////////////////////////////////////////////////////////////// 1020///////////////////////////////////////////////////////////////
diff --git a/linden/indra/llrender/llimagegl.cpp b/linden/indra/llrender/llimagegl.cpp
index c63d7ad..f99d4a9 100644
--- a/linden/indra/llrender/llimagegl.cpp
+++ b/linden/indra/llrender/llimagegl.cpp
@@ -711,7 +711,9 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
711 { 711 {
712 S32 bytes = w * h * mComponents; 712 S32 bytes = w * h * mComponents;
713 llassert(prev_mip_data); 713 llassert(prev_mip_data);
714 llassert(prev_mip_size == bytes*4); 714 llassert(prev_mip_size == (bytes*4));
715 // Work around llassert() being compiled out and prev_mip_size not otherwise being used.
716 prev_mip_size = prev_mip_size + 0;
715 U8* new_data = new U8[bytes]; 717 U8* new_data = new U8[bytes];
716 llassert_always(new_data); 718 llassert_always(new_data);
717 LLImageBase::generateMip(prev_mip_data, new_data, w, h, mComponents); 719 LLImageBase::generateMip(prev_mip_data, new_data, w, h, mComponents);
diff --git a/linden/indra/llui/llfunctorregistry.h b/linden/indra/llui/llfunctorregistry.h
index 8864f7a..7c03f2f 100644
--- a/linden/indra/llui/llfunctorregistry.h
+++ b/linden/indra/llui/llfunctorregistry.h
@@ -75,7 +75,6 @@ public:
75 bool registerFunctor(const std::string& name, ResponseFunctor f) 75 bool registerFunctor(const std::string& name, ResponseFunctor f)
76 { 76 {
77 bool retval = true; 77 bool retval = true;
78 typename FunctorMap::iterator it = mMap.find(name);
79 if (mMap.count(name) == 0) 78 if (mMap.count(name) == 0)
80 { 79 {
81 mMap[name] = f; 80 mMap[name] = f;
@@ -102,7 +101,6 @@ public:
102 101
103 FUNCTOR_TYPE getFunctor(const std::string& name) 102 FUNCTOR_TYPE getFunctor(const std::string& name)
104 { 103 {
105 typename FunctorMap::iterator it = mMap.find(name);
106 if (mMap.count(name) != 0) 104 if (mMap.count(name) != 0)
107 { 105 {
108 return mMap[name]; 106 return mMap[name];
diff --git a/linden/indra/llwindow/GL/glh_extensions.h b/linden/indra/llwindow/GL/glh_extensions.h
index 5b149c9..ce2865b 100644
--- a/linden/indra/llwindow/GL/glh_extensions.h
+++ b/linden/indra/llwindow/GL/glh_extensions.h
@@ -111,7 +111,9 @@ static const char* EatNonWhiteSpace(const char *str)
111int glh_init_extensions(const char *origReqExts) 111int glh_init_extensions(const char *origReqExts)
112{ 112{
113 // Length of requested extensions string 113 // Length of requested extensions string
114 /*
114 unsigned reqExtsLen; 115 unsigned reqExtsLen;
116 */
115 char *reqExts; 117 char *reqExts;
116 // Ptr for individual extensions within reqExts 118 // Ptr for individual extensions within reqExts
117 char *reqExt; 119 char *reqExt;
@@ -153,8 +155,8 @@ int glh_init_extensions(const char *origReqExts)
153 return TRUE; 155 return TRUE;
154 } 156 }
155 reqExts = strdup(origReqExts); 157 reqExts = strdup(origReqExts);
156 reqExtsLen = (S32)strlen(reqExts);
157 /* 158 /*
159 reqExtsLen = (S32)strlen(reqExts);
158 if (NULL == gGLHExts.mUnsupportedExts) 160 if (NULL == gGLHExts.mUnsupportedExts)
159 { 161 {
160 gGLHExts.mUnsupportedExts = (char*)malloc(reqExtsLen + 1); 162 gGLHExts.mUnsupportedExts = (char*)malloc(reqExtsLen + 1);
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,
809 // is there a fault? 809 // is there a fault?
810 // if yes, print out message and exit 810 // if yes, print out message and exit
811 S32 value = getVersion(); 811 S32 value = getVersion();
812 S32 major_version = 0; 812 if ((value != LSL2_VERSION1_END_NUMBER) && (value != LSL2_VERSION_NUMBER))
813 if (value == LSL2_VERSION1_END_NUMBER)
814 {
815 major_version = 1;
816 }
817 else if (value == LSL2_VERSION_NUMBER)
818 {
819 major_version = 2;
820 }
821 else
822 { 813 {
823 setFault(LSRF_VERSION_MISMATCH); 814 setFault(LSRF_VERSION_MISMATCH);
824 } 815 }
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)
150 150
151 // get offset to skip past name 151 // get offset to skip past name
152 varoffset = global_v_offset; 152 varoffset = global_v_offset;
153 // 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?
153 offset = bytestream2integer(mRawData, global_v_offset); 154 offset = bytestream2integer(mRawData, global_v_offset);
155 offset = offset + 0;
154 156
155 // get typeexport 157 // get typeexport
156 type = *(mRawData + global_v_offset++); 158 type = *(mRawData + global_v_offset++);
@@ -268,8 +270,6 @@ void LLScriptLSOParse::printGlobalFunctions(LLFILE *fp)
268 fprintf(fp, "[Function #%d] [0x%X] %s\n", function_number, orig_function_offset, name); 270 fprintf(fp, "[Function #%d] [0x%X] %s\n", function_number, orig_function_offset, name);
269 fprintf(fp, "\tReturn Type: %s\n", LSCRIPTTypeNames[type]); 271 fprintf(fp, "\tReturn Type: %s\n", LSCRIPTTypeNames[type]);
270 type = *(mRawData + function_offset++); 272 type = *(mRawData + function_offset++);
271 S32 params;
272 params = 0;
273 S32 pcount = 0; 273 S32 pcount = 0;
274 while (type) 274 while (type)
275 { 275 {
@@ -362,7 +362,9 @@ void LLScriptLSOParse::printStates(LLFILE *fp)
362 if (event_handlers & LSCRIPTStateBitField[k]) 362 if (event_handlers & LSCRIPTStateBitField[k])
363 { 363 {
364 temp_end = bytestream2integer(mRawData, read_ahead); 364 temp_end = bytestream2integer(mRawData, read_ahead);
365 // 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.
365 dummy = bytestream2integer(mRawData, read_ahead); 366 dummy = bytestream2integer(mRawData, read_ahead);
367 dummy = dummy + 0;
366 if ( (temp_end < opcode_end) 368 if ( (temp_end < opcode_end)
367 &&(temp_end > event_offset)) 369 &&(temp_end > event_offset))
368 { 370 {