GCC 4.6 fixes

This commit is contained in:
Siana Gearz
2011-05-16 01:37:00 +02:00
parent 3abc778f2c
commit adeba18356
4 changed files with 11 additions and 5 deletions

View File

@@ -164,6 +164,11 @@ if (LINUX)
add_definitions(-Wno-parentheses) add_definitions(-Wno-parentheses)
endif (${CXX_VERSION} GREATER 429) endif (${CXX_VERSION} GREATER 429)
#gcc 4.6 has a new spammy warning
if(NOT ${CXX_VERSION} LESS 460)
add_definitions(-Wno-unused-but-set-variable)
endif (NOT ${CXX_VERSION} LESS 460)
# End of hacks. # End of hacks.
add_definitions( add_definitions(

View File

@@ -1447,9 +1447,12 @@ S32 LLSDBinaryFormatter::format(const LLSD& data, std::ostream& ostr, U32 option
} }
case LLSD::TypeUUID: case LLSD::TypeUUID:
{
ostr.put('u'); ostr.put('u');
ostr.write((const char*)(&(data.asUUID().mData)), UUID_BYTES); LLUUID d = data.asUUID();
ostr.write((const char*)(&(d.mData)), UUID_BYTES);
break; break;
}
case LLSD::TypeString: case LLSD::TypeString:
ostr.put('s'); ostr.put('s');

View File

@@ -605,13 +605,13 @@ BOOL LLParcel::importAccessEntry(std::istream& input_stream, LLAccessEntry* entr
} }
else if ("time" == keyword) else if ("time" == keyword)
{ {
S32 when; S32 when = -1;
LLStringUtil::convertToS32(value, when); LLStringUtil::convertToS32(value, when);
entry->mTime = when; entry->mTime = when;
} }
else if ("flags" == keyword) else if ("flags" == keyword)
{ {
U32 setting; U32 setting = 0xFFFFFFFF;
LLStringUtil::convertToU32(value, setting); LLStringUtil::convertToU32(value, setting);
entry->mFlags = setting; entry->mFlags = setting;
} }

View File

@@ -75,7 +75,6 @@ public:
bool registerFunctor(const std::string& name, ResponseFunctor f) bool registerFunctor(const std::string& name, ResponseFunctor f)
{ {
bool retval = true; bool retval = true;
typename FunctorMap::iterator it = mMap.find(name);
if (mMap.count(name) == 0) if (mMap.count(name) == 0)
{ {
mMap[name] = f; mMap[name] = f;
@@ -102,7 +101,6 @@ public:
FUNCTOR_TYPE getFunctor(const std::string& name) FUNCTOR_TYPE getFunctor(const std::string& name)
{ {
typename FunctorMap::iterator it = mMap.find(name);
if (mMap.count(name) != 0) if (mMap.count(name) != 0)
{ {
return mMap[name]; return mMap[name];