Mods to make compile on gcc 4.6.3 work mo betta

meow-7.2.2
Graham Madarasz 2013-03-12 10:48:05 -07:00
parent e08de2f609
commit e8b8a12b73
13 changed files with 23 additions and 18 deletions

View File

@ -135,6 +135,10 @@ if (LINUX)
set(CMAKE_CXX_FLAGS "-Wno-deprecated -Wno-uninitialized -Wno-unused-variable -Wno-unused-function ${CMAKE_CXX_FLAGS}")
endif (${CXX_VERSION_NUMBER} LESS 420)
if(${CXX_VERSION_NUMBER} GREATER 459)
set(CMAKE_CXX_FLAGS "-Wno-deprecated -Wno-unused-but-set-variable -Wno-unused-variable ${CMAKE_CXX_FLAGS}")
endif (${CXX_VERSION_NUMBER} GREATER 459)
# gcc 4.3 and above don't like the LL boost and also
# cause warnings due to our use of deprecated headers
if(${CXX_VERSION_NUMBER} GREATER 429)

View File

@ -5314,12 +5314,7 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build)
S32 max_t = volume->getPath().mPath.size();
// S32 i;
S32 num_vertices = 0, num_indices = 0;
S32 grid_size = (profile.size()-1)/4;
S32 quad_count = (grid_size * grid_size);
num_vertices = (grid_size+1)*(grid_size+1);
num_indices = quad_count * 4;
LLVector4a& min = mExtents[0];
LLVector4a& max = mExtents[1];

View File

@ -592,6 +592,7 @@ LLIOPipe::EStatus LLIOServerSocket::process_impl(
PUMP_DEBUG;
apr_pool_t* new_pool = NULL;
apr_status_t status = apr_pool_create(&new_pool, mPool);
(void)status;
apr_socket_t* socket = NULL;
status = apr_socket_accept(
&socket,

View File

@ -243,8 +243,6 @@ void LLConsole::draw()
void LLConsole::Paragraph::makeParagraphColorSegments (const LLColor4 &color)
{
LLSD paragraph_color_segments;
LLColor4 lcolor=color;
paragraph_color_segments[0]["text"] =wstring_to_utf8str(mParagraphText);
LLSD color_sd = color.getValue();
paragraph_color_segments[0]["color"]=color_sd;

View File

@ -368,7 +368,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
const llwchar* base = wtext.c_str();
const llwchar* cur = base;
const llwchar* line = NULL;
(void)line;
while( *cur )
{
if( *cur == '\n' || cur == base )

View File

@ -481,7 +481,7 @@ void LLLayoutStack::createResizeBar(LLLayoutPanel* panelp)
{
LLResizeBar::Side side = (mOrientation == HORIZONTAL) ? LLResizeBar::RIGHT : LLResizeBar::BOTTOM;
LLRect resize_bar_rect = getRect();
(void)resize_bar_rect;
LLResizeBar::Params resize_params;
resize_params.name("resize");
resize_params.resizing_view(lp);

View File

@ -351,7 +351,6 @@ void LLTextBase::drawSelectionBackground()
S32 selection_left = llmin( mSelectionStart, mSelectionEnd );
S32 selection_right = llmax( mSelectionStart, mSelectionEnd );
LLRect selection_rect = mVisibleTextRect;
// Skip through the lines we aren't drawing.
LLRect content_display_rect = getVisibleDocumentRect();
@ -2241,6 +2240,8 @@ S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round,
// Figure out which line we're nearest to.
LLRect visible_region = getVisibleDocumentRect();
LLRect doc_rect = mDocumentView->getRect();
(void)visible_region;
(void)doc_rect;
S32 doc_y = local_y - doc_rect.mBottom;

View File

@ -2490,7 +2490,6 @@ void LLTextEditor::updateSegments()
mKeywords.findSegments(&segment_list, getWText(), mDefaultColor.get(), *this);
clearSegments();
segment_set_t::iterator insert_it = mSegments.begin();
for (segment_vec_t::iterator list_it = segment_list.begin(); list_it != segment_list.end(); ++list_it)
{
insertSegment(*list_it);

View File

@ -653,7 +653,6 @@ void LLToolBar::updateLayoutAsNeeded()
S32 max_row_length = 0;
S32 max_length;
S32 max_total_girth;
S32 cur_start;
S32 cur_row ;
S32 row_pad_start;
@ -664,7 +663,6 @@ void LLToolBar::updateLayoutAsNeeded()
if (orientation == LLLayoutStack::HORIZONTAL)
{
max_length = getRect().getWidth() - mPadLeft - mPadRight;
max_total_girth = getRect().getHeight() - mPadTop - mPadBottom;
row_pad_start = mPadLeft;
row_pad_end = mPadRight;
cur_row = mPadTop;
@ -673,7 +671,6 @@ void LLToolBar::updateLayoutAsNeeded()
else // VERTICAL
{
max_length = getRect().getHeight() - mPadTop - mPadBottom;
max_total_girth = getRect().getWidth() - mPadLeft - mPadRight;
row_pad_start = mPadTop;
row_pad_end = mPadBottom;
cur_row = mPadLeft;
@ -842,6 +839,7 @@ void LLToolBar::draw()
{
LLRect caret_rect = caret->getRect();
LLRect toolbar_rect = getRect();
(void)toolbar_rect;
if (getOrientation(mSideType) == LLLayoutStack::HORIZONTAL)
{
caret->setRect(LLRect(mDragx-caret_rect.getWidth()/2+1,

View File

@ -145,7 +145,7 @@ void LLScriptLSOParse::printGlobals(LLFILE *fp)
// get offset to skip past name
varoffset = global_v_offset;
offset = bytestream2integer(mRawData, global_v_offset);
(void)offset; //hush little compiler
// 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)
{
@ -350,6 +348,7 @@ void LLScriptLSOParse::printStates(LLFILE *fp)
S32 dummy;
opcode_end = worst_case_opcode_end;
(void)opcode_end;
for (k = LSTT_STATE_BEGIN; k < LSTT_STATE_END; k++)
{
@ -357,6 +356,7 @@ void LLScriptLSOParse::printStates(LLFILE *fp)
{
temp_end = bytestream2integer(mRawData, read_ahead);
dummy = bytestream2integer(mRawData, read_ahead);
(void)dummy;
if ( (temp_end < opcode_end)
&&(temp_end > event_offset))
{

View File

@ -1141,6 +1141,7 @@ namespace tut
ensure("Connected to server", connected);
lldebugs << "connected" << llendl;
F32 elapsed = pump_loop(mPump,0.1f);
(void)elapsed;
count = mPump->runningChains();
ensure_equals("server chain onboard", count, 2);
lldebugs << "** Client is connected." << llendl;

View File

@ -386,15 +386,17 @@ namespace tut
std::string actual_result;
std::istringstream is;
bool ret;
is.clear();
is.str(str = " First Second \t \r \n Third Fourth-ShouldThisBePartOfFourth Fifth\n");
actual_result = "";
ret = get_word(actual_result, is); // First
(void)ret;
actual_result = "";
ret = get_word(actual_result, is); // Second
(void)ret;
actual_result = "";
ret = get_word(actual_result, is); // Third
(void)ret;
// the current implementation of get_word seems inconsistent with
// skip_to_next_word. skip_to_next_word treats any character other
@ -486,6 +488,7 @@ namespace tut
is.str(str = "First Second \t \r\n Third Fourth-ShouldThisBePartOfFourth IsThisFifth\n");
actual_result = "";
ret = get_line(actual_result, is);
(void)ret;
expected_result = "First Second \t \r\n";
ensure_equals("get_line: 1", actual_result, expected_result);
@ -551,6 +554,7 @@ namespace tut
is.str(str = "Should not skip lone \r.\r\n");
actual_result = "";
ret = get_line(actual_result, is);
(void)ret;
expected_result = "Should not skip lone \r.\r\n";
ensure_equals("get_line: carriage return skipped even though not followed by newline", actual_result, expected_result);
}
@ -569,6 +573,7 @@ namespace tut
is.str(str = "\n");
actual_result = "";
ret = get_line(actual_result, is);
(void)ret;
expected_result = "\n";
ensure_equals("get_line: Just newline", actual_result, expected_result);
}
@ -588,6 +593,7 @@ namespace tut
is.str(str = "First Line.\nSecond Line.\n");
actual_result = "";
ret = get_line(actual_result, is, 255);
(void)ret;
expected_result = "First Line.\n";
ensure_equals("get_line: Basic Operation", actual_result, expected_result);

View File

@ -958,11 +958,13 @@ namespace tut
reader->validateMessage(buffer, builtSize, LLHost());
reader->readMessage(buffer, LLHost());
reader->getU32(_PREHASH_Test0, _PREHASH_Test0, outValue);
(void)outValue;
char outBuffer[bufferSize];
memset(buffer, 0xcc, bufferSize);
reader->getString(_PREHASH_Test1, _PREHASH_Test0, bufferSize,
outBuffer);
outValue2 = reader->getNumberOfBlocks(_PREHASH_Test1);
(void)outValue2;
ensure_equals("Ensure present value ", outValue, inValue);
ensure_equals("Ensure unchanged buffer ", strlen(outBuffer), 0);
delete reader;