diff options
Diffstat (limited to 'indra')
32 files changed, 99 insertions, 110 deletions
| diff --git a/indra/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp index f0b44f97d2..7f747c2eca 100644 --- a/indra/llaudio/llaudiodecodemgr.cpp +++ b/indra/llaudio/llaudiodecodemgr.cpp @@ -215,7 +215,7 @@ BOOL LLVorbisDecodeState::initDecode()  		return(FALSE);  	} -	S32 sample_count = ov_pcm_total(&mVF, -1); +	S32 sample_count = (S32)ov_pcm_total(&mVF, -1);  	size_t size_guess = (size_t)sample_count;  	vorbis_info* vi = ov_info(&mVF, -1);  	size_guess *= (vi? vi->channels : 1); diff --git a/indra/llcommon/linden_common.h b/indra/llcommon/linden_common.h index bdcc98e402..2e4885403e 100644 --- a/indra/llcommon/linden_common.h +++ b/indra/llcommon/linden_common.h @@ -52,24 +52,12 @@  #include <ctime>  #include <iosfwd> -// Work around Microsoft compiler warnings in STL headers -#ifdef LL_WINDOWS -#pragma warning (disable : 4702) // unreachable code -#pragma warning (disable : 4244) // conversion from time_t to S32 -#endif	//	LL_WINDOWS -  // *TODO: Eliminate these, most library .cpp files don't need them.  // Add them to llviewerprecompiledheaders.h if necessary. -#include <list> -#include <map> -#include <vector> -#include <string> - -#ifdef LL_WINDOWS -// Reenable warnings we disabled above -#pragma warning (3 : 4702) // unreachable code, we like level 3, not 4 -// moved msvc warnings to llpreprocessor.h  *TODO - delete this comment after merge conflicts are unlikely -brad -#endif	//	LL_WINDOWS +//#include <list> +//#include <map> +//#include <vector> +//#include <string>  // Linden only libs in alpha-order other than stdtypes.h  // *NOTE: Please keep includes here to a minimum, see above. diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp index db1ea4792b..0855180dcd 100644 --- a/indra/llcommon/llevents.cpp +++ b/indra/llcommon/llevents.cpp @@ -430,13 +430,13 @@ LLBoundListener LLEventPump::listen_impl(const std::string& name, const LLEventL      {          // The new node isn't last. Place it between the previous node and          // the successor. -        newNode = (myprev + mydmi->second)/2.0; +        newNode = (myprev + mydmi->second)/2.f;      }      else      {          // The new node is last. Bump myprev up to the next integer, add          // 1.0 and use that. -        newNode = std::ceil(myprev) + 1.0; +        newNode = std::ceil(myprev) + 1.f;      }      // Now that newNode has a value that places it appropriately in mSignal,      // connect it. diff --git a/indra/llcommon/llmd5.cpp b/indra/llcommon/llmd5.cpp index 75fde8e5ba..1409c55d1c 100644 --- a/indra/llcommon/llmd5.cpp +++ b/indra/llcommon/llmd5.cpp @@ -175,7 +175,7 @@ void LLMD5::update(std::istream& stream){    while (stream.good()){      stream.read( (char*)buffer, BLOCK_LEN); 	/* Flawfinder: ignore */		// note that return value of read is unusable. -    len=stream.gcount(); +    len=(int)stream.gcount();      update(buffer, len);    } diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h index 31d5f3d2c7..7fdb537ab5 100644 --- a/indra/llcommon/llpreprocessor.h +++ b/indra/llcommon/llpreprocessor.h @@ -132,7 +132,7 @@  #pragma warning( 3       : 4265 )	// "class has virtual functions, but destructor is not virtual"  #pragma warning( 3      :  4266 )	// 'function' : no override available for virtual member function from base 'type'; function is hidden  #pragma warning (disable : 4180)	// qualifier applied to function type has no meaning; ignored -#pragma warning( disable : 4284 )	// silly MS warning deep inside their <map> include file +//#pragma warning( disable : 4284 )	// silly MS warning deep inside their <map> include file  #pragma warning( disable : 4503 )	// 'decorated name length exceeded, name was truncated'. Does not seem to affect compilation.  #pragma warning( disable : 4800 )	// 'BOOL' : forcing value to bool 'true' or 'false' (performance warning)  #pragma warning( disable : 4996 )	// warning: deprecated @@ -152,6 +152,7 @@  #pragma warning (disable : 4251) // member needs to have dll-interface to be used by clients of class  #pragma warning (disable : 4275) // non dll-interface class used as base for dll-interface class  #pragma warning (disable : 4018) // '<' : signed/unsigned mismatch	 +  #endif	//	LL_MSVC  #if LL_WINDOWS diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp index bf62600514..b419101b7e 100644 --- a/indra/llcommon/llsdserialize.cpp +++ b/indra/llcommon/llsdserialize.cpp @@ -110,7 +110,7 @@ bool LLSDSerialize::deserialize(LLSD& sd, std::istream& str, S32 max_bytes)  	if (!strncasecmp(LEGACY_NON_HEADER, hdr_buf, strlen(LEGACY_NON_HEADER))) /* Flawfinder: ignore */  	{  		legacy_no_header = true; -		inbuf = str.gcount(); +		inbuf = (int)str.gcount();  	}  	else  	{ @@ -343,7 +343,7 @@ std::istream& LLSDParser::get(  	char delim) const  {  	istr.get(s, n, delim); -	if(mCheckLimits) mMaxBytesLeft -= istr.gcount(); +	if(mCheckLimits) mMaxBytesLeft -= (int)istr.gcount();  	return istr;  } @@ -353,7 +353,7 @@ std::istream& LLSDParser::get(  		char delim) const		  {  	istr.get(sb, delim); -	if(mCheckLimits) mMaxBytesLeft -= istr.gcount(); +	if(mCheckLimits) mMaxBytesLeft -= (int)istr.gcount();  	return istr;  } @@ -377,7 +377,7 @@ std::istream& LLSDParser::read(  	std::streamsize n) const  {  	istr.read(s, n); -	if(mCheckLimits) mMaxBytesLeft -= istr.gcount(); +	if(mCheckLimits) mMaxBytesLeft -= (int)istr.gcount();  	return istr;  } @@ -789,7 +789,7 @@ bool LLSDNotationParser::parseBinary(std::istream& istr, LLSD& data) const  		if(len)  		{  			value.resize(len); -			account(fullread(istr, (char *)&value[0], len)); +			account((int)fullread(istr, (char *)&value[0], len));  		}  		c = get(istr); // strip off the trailing double-quote  		data = value; @@ -1069,7 +1069,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const  			if(size > 0)  			{  				value.resize(size); -				account(fullread(istr, (char*)&value[0], size)); +				account((int)fullread(istr, (char*)&value[0], size));  			}  			data = value;  		} @@ -1200,7 +1200,7 @@ bool LLSDBinaryParser::parseString(  	if(size)  	{  		buf.resize(size); -		account(fullread(istr, &buf[0], size)); +		account((int)fullread(istr, &buf[0], size));  		value.assign(buf.begin(), buf.end());  	}  	return true; @@ -1642,7 +1642,7 @@ int deserialize_string_raw(  	const S32 BUF_LEN = 20;  	char buf[BUF_LEN];		/* Flawfinder: ignore */  	istr.get(buf, BUF_LEN - 1, ')'); -	count += istr.gcount(); +	count += (int)istr.gcount();  	int c = istr.get();  	c = istr.get();  	count += 2; @@ -1657,7 +1657,7 @@ int deserialize_string_raw(  		if(len)  		{  			buf.resize(len); -			count += fullread(istr, (char *)&buf[0], len); +			count += (int)fullread(istr, (char *)&buf[0], len);  			value.assign(buf.begin(), buf.end());  		}  		c = istr.get(); diff --git a/indra/llcommon/llsdserialize_xml.cpp b/indra/llcommon/llsdserialize_xml.cpp index be9db53906..34b3dbb99a 100644 --- a/indra/llcommon/llsdserialize_xml.cpp +++ b/indra/llcommon/llsdserialize_xml.cpp @@ -464,7 +464,7 @@ S32 LLSDXMLParser::Impl::parseLines(std::istream& input, LLSD& data)  			}  		} -		status = XML_ParseBuffer(mParser, num_read, false); +		status = XML_ParseBuffer(mParser, (int)num_read, false);  		if (status == XML_STATUS_ERROR)  		{  			break; diff --git a/indra/llcommon/llsdutil.h b/indra/llcommon/llsdutil.h index 65c7297cbf..532d3f9341 100644 --- a/indra/llcommon/llsdutil.h +++ b/indra/llcommon/llsdutil.h @@ -308,7 +308,7 @@ class LLSDParam<T>                              \  {                                               \  public:                                         \      LLSDParam(const LLSD& value):               \ -        _value(value.AS())                      \ +        _value((T)value.AS())                      \      {}                                          \                                                  \      operator T() const { return _value; }       \ diff --git a/indra/llcommon/llstat.cpp b/indra/llcommon/llstat.cpp index b2c495d093..057257057f 100644 --- a/indra/llcommon/llstat.cpp +++ b/indra/llcommon/llstat.cpp @@ -593,7 +593,7 @@ void LLStatTime::stop()  {      if ( LLStatAccum::SCALE_PER_FRAME == scale )      { -        return mTotalTimeInFrame; +        return (F32)mTotalTimeInFrame;      }      else      { diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp index 38054b636e..9ebc6de7f4 100644 --- a/indra/llcommon/lltimer.cpp +++ b/indra/llcommon/lltimer.cpp @@ -83,7 +83,7 @@ U32 micro_sleep(U64 us, U32 max_yields)  {      // max_yields is unused; just fiddle with it to avoid warnings.      max_yields = 0; -    ms_sleep(us / 1000); +	ms_sleep((U32)(us / 1000));      return 0;  }  #elif LL_LINUX || LL_SOLARIS || LL_DARWIN diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp index 3461aa3e6c..d6dcde4b9f 100644 --- a/indra/llcrashlogger/llcrashlogger.cpp +++ b/indra/llcrashlogger/llcrashlogger.cpp @@ -250,7 +250,7 @@ void LLCrashLogger::gatherFiles()  		if(minidump_stream.is_open())  		{  			minidump_stream.seekg(0, std::ios::end); -			size_t length = minidump_stream.tellg(); +			size_t length = (size_t)minidump_stream.tellg();  			minidump_stream.seekg(0, std::ios::beg);  			LLSD::Binary data; diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp index cc8cb66d73..8241746a74 100644 --- a/indra/llimage/llimagej2c.cpp +++ b/indra/llimage/llimagej2c.cpp @@ -501,10 +501,10 @@ void LLImageCompressionTester::outputTestRecord(LLSD *sd)  	F32 decompressionRate = 0.0f;  	F32 compressionRate   = 0.0f; -	F32 totalkBInDecompression  = (F32)(mTotalBytesInDecompression)  / 1000.0; -	F32 totalkBOutDecompression = (F32)(mTotalBytesOutDecompression) / 1000.0; -	F32 totalkBInCompression    = (F32)(mTotalBytesInCompression)    / 1000.0; -	F32 totalkBOutCompression   = (F32)(mTotalBytesOutCompression)   / 1000.0; +	F32 totalkBInDecompression  = (F32)(mTotalBytesInDecompression)  / 1000.f; +	F32 totalkBOutDecompression = (F32)(mTotalBytesOutDecompression) / 1000.f; +	F32 totalkBInCompression    = (F32)(mTotalBytesInCompression)    / 1000.f; +	F32 totalkBOutCompression   = (F32)(mTotalBytesOutCompression)   / 1000.f;  	if (!is_approx_zero(mTotalTimeDecompression))  	{ diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index 76760aa414..fbf23bc3f0 100644 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -405,7 +405,7 @@ U32 LLInventoryItem::getCRC32() const  	//lldebugs << "7 crc: " << std::hex << crc << std::dec << llendl;  	crc += mSaleInfo.getCRC32();  	//lldebugs << "8 crc: " << std::hex << crc << std::dec << llendl; -	crc += mCreationDate; +	crc += (U32)mCreationDate;  	//lldebugs << "9 crc: " << std::hex << crc << std::dec << llendl;  	return crc;  } @@ -521,7 +521,7 @@ void LLInventoryItem::packMessage(LLMessageSystem* msg) const  	mSaleInfo.packMessage(msg);  	msg->addStringFast(_PREHASH_Name, mName);  	msg->addStringFast(_PREHASH_Description, mDescription); -	msg->addS32Fast(_PREHASH_CreationDate, mCreationDate); +	msg->addS32Fast(_PREHASH_CreationDate, (S32)mCreationDate);  	U32 crc = getCRC32();  	msg->addU32Fast(_PREHASH_CRC, crc);  } diff --git a/indra/llmath/llcalcparser.h b/indra/llmath/llcalcparser.h index bd9c8c2519..3509bd289b 100644 --- a/indra/llmath/llcalcparser.h +++ b/indra/llmath/llcalcparser.h @@ -174,7 +174,7 @@ private:  	F32 _log(const F32& a) const { return log(a); }  	F32 _exp(const F32& a) const { return exp(a); }  	F32 _fabs(const F32& a) const { return fabs(a); } -	F32 _floor(const F32& a) const { return llfloor(a); } +	F32 _floor(const F32& a) const { return (F3)llfloor(a); }  	F32 _ceil(const F32& a) const { return llceil(a); }  	F32 _atan2(const F32& a,const F32& b) const { return atan2(a,b); } diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 0c6cf1dfae..f08657a75c 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -2903,7 +2903,7 @@ F32 LLVolume::sculptGetSurfaceArea()  			// compute the area of the quad by taking the length of the cross product of the two triangles  			LLVector3 cross1 = (p1 - p2) % (p1 - p3);  			LLVector3 cross2 = (p4 - p2) % (p4 - p3); -			area += (cross1.magVec() + cross2.magVec()) / 2.0; +			area += (cross1.magVec() + cross2.magVec()) / 2.f;  		}  	} @@ -5887,7 +5887,7 @@ F32 find_vertex_score(LLVCacheVertexData& data)  	}  	//bonus points for having low valence -	F32 valence_boost = powf(data.mActiveTriangles, -FindVertexScore_ValenceBoostPower); +	F32 valence_boost = powf((F32)data.mActiveTriangles, -FindVertexScore_ValenceBoostPower);  	score += FindVertexScore_ValenceBoostScale * valence_boost;  	return score; diff --git a/indra/llmath/m4math.cpp b/indra/llmath/m4math.cpp index bad4deb4de..6a1b4143cf 100644 --- a/indra/llmath/m4math.cpp +++ b/indra/llmath/m4math.cpp @@ -858,25 +858,25 @@ LLSD LLMatrix4::getValue() const  void LLMatrix4::setValue(const LLSD& data)   { -	mMatrix[0][0] = data[0].asReal(); -	mMatrix[0][1] = data[1].asReal(); -	mMatrix[0][2] = data[2].asReal(); -	mMatrix[0][3] = data[3].asReal(); - -	mMatrix[1][0] = data[4].asReal(); -	mMatrix[1][1] = data[5].asReal(); -	mMatrix[1][2] = data[6].asReal(); -	mMatrix[1][3] = data[7].asReal(); - -	mMatrix[2][0] = data[8].asReal(); -	mMatrix[2][1] = data[9].asReal(); -	mMatrix[2][2] = data[10].asReal(); -	mMatrix[2][3] = data[11].asReal(); - -	mMatrix[3][0] = data[12].asReal(); -	mMatrix[3][1] = data[13].asReal(); -	mMatrix[3][2] = data[14].asReal(); -	mMatrix[3][3] = data[15].asReal(); +	mMatrix[0][0] = (F32)data[0].asReal(); +	mMatrix[0][1] = (F32)data[1].asReal(); +	mMatrix[0][2] = (F32)data[2].asReal(); +	mMatrix[0][3] = (F32)data[3].asReal(); + +	mMatrix[1][0] = (F32)data[4].asReal(); +	mMatrix[1][1] = (F32)data[5].asReal(); +	mMatrix[1][2] = (F32)data[6].asReal(); +	mMatrix[1][3] = (F32)data[7].asReal(); + +	mMatrix[2][0] = (F32)data[8].asReal(); +	mMatrix[2][1] = (F32)data[9].asReal(); +	mMatrix[2][2] = (F32)data[10].asReal(); +	mMatrix[2][3] = (F32)data[11].asReal(); + +	mMatrix[3][0] = (F32)data[12].asReal(); +	mMatrix[3][1] = (F32)data[13].asReal(); +	mMatrix[3][2] = (F32)data[14].asReal(); +	mMatrix[3][3] = (F32)data[15].asReal();  } diff --git a/indra/llmessage/llbufferstream.cpp b/indra/llmessage/llbufferstream.cpp index 6257983c43..bb65d16670 100644 --- a/indra/llmessage/llbufferstream.cpp +++ b/indra/llmessage/llbufferstream.cpp @@ -273,7 +273,7 @@ streampos LLBufferStreamBuf::seekoff(  			// NULL is fine  			break;  		} -		address = mBuffer->seek(mChannels.in(), base_addr, off); +		address = (S32)mBuffer->seek(mChannels.in(), base_addr, off);  		if(address)  		{  			LLBufferArray::segment_iterator_t iter; @@ -304,7 +304,7 @@ streampos LLBufferStreamBuf::seekoff(  			// NULL is fine  			break;  		} -		address = mBuffer->seek(mChannels.out(), base_addr, off); +		address = (S32)mBuffer->seek(mChannels.out(), base_addr, off);  		if(address)  		{  			LLBufferArray::segment_iterator_t iter; diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index e17380fdf5..344463f036 100644 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -428,9 +428,9 @@ size_t curlReadCallback(char* data, size_t size, size_t nmemb, void* user_data)  	LLCurl::Easy* easy = (LLCurl::Easy*)user_data;  	S32 n = size * nmemb; -	S32 startpos = easy->getInput().tellg(); +	S32 startpos = (S32)easy->getInput().tellg();  	easy->getInput().seekg(0, std::ios::end); -	S32 endpos = easy->getInput().tellg(); +	S32 endpos = (S32)easy->getInput().tellg();  	easy->getInput().seekg(startpos, std::ios::beg);  	S32 maxn = endpos - startpos;  	n = llmin(n, maxn); diff --git a/indra/llmessage/llhttpclient.cpp b/indra/llmessage/llhttpclient.cpp index dd4e3a6300..98983ad28a 100644 --- a/indra/llmessage/llhttpclient.cpp +++ b/indra/llmessage/llhttpclient.cpp @@ -158,7 +158,7 @@ namespace  			if(fstream.is_open())  			{  				fstream.seekg(0, std::ios::end); -				U32 fileSize = fstream.tellg(); +				U32 fileSize = (U32)fstream.tellg();  				fstream.seekg(0, std::ios::beg);  				std::vector<char> fileBuffer(fileSize);  				fstream.read(&fileBuffer[0], fileSize); diff --git a/indra/llmessage/llmime.cpp b/indra/llmessage/llmime.cpp index 943a734927..9d9c4ebd68 100644 --- a/indra/llmessage/llmime.cpp +++ b/indra/llmessage/llmime.cpp @@ -388,7 +388,7 @@ bool LLMimeParser::Impl::parseHeaders(  		// not to read past limit when we get() the newline.  		S32 max_get = llmin((S32)LINE_BUFFER_LENGTH, limit - mScanCount - 1);  		istr.getline(mBuffer, max_get, '\r'); -		mScanCount += istr.gcount(); +		mScanCount += (S32)istr.gcount();  		int c = istr.get();  		if(EOF == c)  		{ @@ -496,7 +496,7 @@ void LLMimeParser::Impl::scanPastSeparator(  		// past limit when we get() the newline.  		S32 max_get = llmin((S32)LINE_BUFFER_LENGTH, limit - mScanCount - 1);  		istr.getline(mBuffer, max_get, '\r'); -		mScanCount += istr.gcount(); +		mScanCount += (S32)istr.gcount();  		if(istr.gcount() >= LINE_BUFFER_LENGTH - 1)  		{  			// that's way too long to be a separator, so ignore it. diff --git a/indra/llmessage/llsdmessage.cpp b/indra/llmessage/llsdmessage.cpp index 9148c9dd15..1c93c12d99 100644 --- a/indra/llmessage/llsdmessage.cpp +++ b/indra/llmessage/llsdmessage.cpp @@ -88,7 +88,7 @@ bool LLSDMessage::httpListener(const LLSD& request)                                                         request,                                                         url, "POST", reply, error),                         LLSD(),      // headers -                       timeout); +                       (F32)timeout);      return false;  } diff --git a/indra/llmessage/llsdmessagebuilder.cpp b/indra/llmessage/llsdmessagebuilder.cpp index 2698a271ee..615221e0ad 100644 --- a/indra/llmessage/llsdmessagebuilder.cpp +++ b/indra/llmessage/llsdmessagebuilder.cpp @@ -317,7 +317,7 @@ void LLSDMessageBuilder::copyFromMessageData(const LLMsgData& data)  			// S64 not supported in LLSD so we just truncate it  			case MVT_S64: -				addS32(varname, *(S64*)mvci.getData()); +				addS32(varname, (S32)*(S64*)mvci.getData());  				break;  			case MVT_F32: diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp index d0b0e178b8..6a425cfe98 100644 --- a/indra/llmessage/message.cpp +++ b/indra/llmessage/message.cpp @@ -3147,7 +3147,7 @@ bool LLMessageSystem::generateDigestForWindowAndUUIDs(char* digest, const S32 wi  		LL_ERRS("Messaging") << "Trying to generate complex digest on a machine without a shared secret!" << llendl;  	} -	U32 now = time(NULL); +	U32 now = (U32)time(NULL);  	now /= window; @@ -3167,7 +3167,7 @@ bool LLMessageSystem::isMatchingDigestForWindowAndUUIDs(const char* digest, cons  	}  	char our_digest[MD5HEX_STR_SIZE];	/* Flawfinder: ignore */ -	U32 now = time(NULL); +	U32 now = (U32)time(NULL);  	now /= window; @@ -3213,7 +3213,7 @@ bool LLMessageSystem::generateDigestForWindow(char* digest, const S32 window) co  		LL_ERRS("Messaging") << "Trying to generate simple digest on a machine without a shared secret!" << llendl;  	} -	U32 now = time(NULL); +	U32 now = (U32)time(NULL);  	now /= window; diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index 4eb10b2c93..4519c5e789 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -115,23 +115,23 @@ static LLFastTimer::DeclareTimer FTM_RENDER_FONTS("Fonts");  S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRect& rect, const LLColor4 &color, HAlign halign, VAlign valign, U8 style,   					 ShadowType shadow, S32 max_chars, F32* right_x, BOOL use_ellipses) const  { -	F32 x = rect.mLeft; +	F32 x = (F32)rect.mLeft;  	F32 y = 0.f;  	switch(valign)  	{  	case TOP: -		y = rect.mTop; +		y = (F32)rect.mTop;  		break;  	case VCENTER: -		y = rect.getCenterY(); +		y = (F32)rect.getCenterY();  		break;  	case BASELINE:  	case BOTTOM: -		y = rect.mBottom; +		y = (F32)rect.mBottom;  		break;  	default: -		y = rect.mBottom; +		y = (F32)rect.mBottom;  		break;  	}  	return render(wstr, begin_offset, x, y, color, halign, valign, style, shadow, max_chars, rect.getWidth(), right_x, use_ellipses); @@ -251,7 +251,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons  	cur_render_y = cur_y;  	cur_render_x = cur_x; -	F32 start_x = llround(cur_x); +	F32 start_x = (F32)llround(cur_x);  	const LLFontBitmapCache* font_bitmap_cache = mFontFreetype->getFontBitmapCache(); @@ -335,10 +335,10 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons  				(fgi->mXBitmapOffset + fgi->mWidth) * inv_width,  				(fgi->mYBitmapOffset - PAD_UVY) * inv_height);  		// snap glyph origin to whole screen pixel -		LLRectf screen_rect(llround(cur_render_x + (F32)fgi->mXBearing), -				    llround(cur_render_y + (F32)fgi->mYBearing), -				    llround(cur_render_x + (F32)fgi->mXBearing) + (F32)fgi->mWidth, -				    llround(cur_render_y + (F32)fgi->mYBearing) - (F32)fgi->mHeight); +		LLRectf screen_rect((F32)llround(cur_render_x + (F32)fgi->mXBearing), +				    (F32)llround(cur_render_y + (F32)fgi->mYBearing), +				    (F32)llround(cur_render_x + (F32)fgi->mXBearing) + (F32)fgi->mWidth, +				    (F32)llround(cur_render_y + (F32)fgi->mYBearing) - (F32)fgi->mHeight);  		if (glyph_count >= GLYPH_BATCH_SIZE)  		{ @@ -636,7 +636,7 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch  		}  		// Round after kerning. -		cur_x = llround(cur_x); +		cur_x = (F32)llround(cur_x);  		drawn_x = cur_x;  	} @@ -707,7 +707,7 @@ S32	LLFontGL::firstDrawableChar(const llwchar* wchars, F32 max_pixels, S32 text_  		}  		// Round after kerning. -		total_width = llround(total_width); +		total_width = (F32)llround(total_width);  	}  	if (drawable_chars == 0) @@ -790,7 +790,7 @@ S32 LLFontGL::charFromPixelOffset(const llwchar* wchars, S32 begin_offset, F32 t  		// Round after kerning. -		cur_x = llround(cur_x); +		cur_x = (F32)llround(cur_x);  	}  	return llmin(max_chars, pos - begin_offset); diff --git a/indra/llui/lldraghandle.cpp b/indra/llui/lldraghandle.cpp index 5f69c6af31..42e6c3c786 100644 --- a/indra/llui/lldraghandle.cpp +++ b/indra/llui/lldraghandle.cpp @@ -244,7 +244,7 @@ void LLDragHandleTop::reshapeTitleBox()  	const LLFontGL* font = LLFontGL::getFontSansSerif();  	S32 title_width = getRect().getWidth();  	title_width -= LEFT_PAD + 2 * BORDER_PAD + getButtonsRect().getWidth(); -	S32 title_height = font->getLineHeight(); +	S32 title_height = llround(font->getLineHeight());  	LLRect title_rect;  	title_rect.setLeftTopAndSize(   		LEFT_PAD,  diff --git a/indra/llvfs/lllfsthread.cpp b/indra/llvfs/lllfsthread.cpp index 3d3ed9f6d4..073b1af2a1 100644 --- a/indra/llvfs/lllfsthread.cpp +++ b/indra/llvfs/lllfsthread.cpp @@ -45,7 +45,7 @@ void LLLFSThread::initClass(bool local_is_threaded)  //static  S32 LLLFSThread::updateClass(U32 ms_elapsed)  { -	sLocal->update(ms_elapsed); +	sLocal->update((F32)ms_elapsed);  	return sLocal->getPending();  } diff --git a/indra/llvfs/llvfsthread.cpp b/indra/llvfs/llvfsthread.cpp index 254f8b55ba..a57e2b15ab 100644 --- a/indra/llvfs/llvfsthread.cpp +++ b/indra/llvfs/llvfsthread.cpp @@ -46,7 +46,7 @@ void LLVFSThread::initClass(bool local_is_threaded)  //static  S32 LLVFSThread::updateClass(U32 ms_elapsed)  { -	sLocal->update(ms_elapsed); +	sLocal->update((F32)ms_elapsed);  	return sLocal->getPending();  } diff --git a/indra/llxml/llxmlnode.cpp b/indra/llxml/llxmlnode.cpp index 3d4e6f9a0b..2ffb0d8503 100644 --- a/indra/llxml/llxmlnode.cpp +++ b/indra/llxml/llxmlnode.cpp @@ -801,7 +801,7 @@ bool LLXMLNode::parseStream(  	while(str.good())  	{  		str.read((char*)buffer, BUFSIZE); -		int count = str.gcount(); +		int count = (int)str.gcount();  		if (XML_Parse(my_parser, (const char *)buffer, count, !str.good()) != XML_STATUS_OK)  		{ diff --git a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp index 999f754dcf..24328202cb 100644 --- a/indra/media_plugins/quicktime/media_plugin_quicktime.cpp +++ b/indra/media_plugins/quicktime/media_plugin_quicktime.cpp @@ -705,7 +705,7 @@ private:  		// look up "Display Name" in meta data  		OSType meta_data_key = kQTMetaDataCommonKeyDisplayName;  		QTMetaDataItem item = kQTMetaDataItemUninitialized; -		result = QTMetaDataGetNextItem( media_data_ref, kQTMetaDataStorageFormatWildcard,  +		result = (OSErr)QTMetaDataGetNextItem( media_data_ref, kQTMetaDataStorageFormatWildcard,   										0, kQTMetaDataKeyFormatCommon,   										(const UInt8 *)&meta_data_key,   										sizeof( meta_data_key ), &item ); @@ -714,14 +714,14 @@ private:  		// find the size of the title  		ByteCount size; -		result = QTMetaDataGetItemValue( media_data_ref, item, NULL, 0, &size ); +		result = (OSErr)QTMetaDataGetItemValue( media_data_ref, item, NULL, 0, &size );  		if ( noErr != result || size <= 0 /*|| size > 1024  FIXME: arbitrary limit */ )   			return false;  		// allocate some space and grab it  		UInt8* item_data = new UInt8[ size + 1 ];  		memset( item_data, 0, ( size + 1 ) * sizeof( UInt8 ) ); -		result = QTMetaDataGetItemValue( media_data_ref, item, item_data, size, NULL ); +		result = (OSErr)QTMetaDataGetItemValue( media_data_ref, item, item_data, size, NULL );  		if ( noErr != result )   		{  			delete [] item_data; diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 47f8dcd545..1812abd7d5 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -991,7 +991,7 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)  		{  			if(message_name == "set_volume")  			{ -				F32 volume = message_in.getValueReal("volume"); +				F32 volume = (F32)message_in.getValueReal("volume");  				setVolume(volume);  			}  		} @@ -1057,9 +1057,9 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)  				S32 height = message_in.getValueS32("height");  				S32 texture_width = message_in.getValueS32("texture_width");  				S32 texture_height = message_in.getValueS32("texture_height"); -				mBackgroundR = message_in.getValueReal("background_r"); -				mBackgroundG = message_in.getValueReal("background_g"); -				mBackgroundB = message_in.getValueReal("background_b"); +				mBackgroundR = (F32)message_in.getValueReal("background_r"); +				mBackgroundG = (F32)message_in.getValueReal("background_g"); +				mBackgroundB = (F32)message_in.getValueReal("background_b");  //				mBackgroundA = message_in.setValueReal("background_a");		// Ignore any alpha  				if(!name.empty()) @@ -1245,9 +1245,9 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)  			if(message_name == "js_agent_location")  			{  #if LLQTWEBKIT_API_VERSION >= 9 -				F32 x = message_in.getValueReal("x"); -				F32 y = message_in.getValueReal("y"); -				F32 z = message_in.getValueReal("z"); +				F32 x = (F32)message_in.getValueReal("x"); +				F32 y = (F32)message_in.getValueReal("y"); +				F32 z = (F32)message_in.getValueReal("z");  				LLQtWebKit::getInstance()->setAgentLocation( x, y, z );  				LLQtWebKit::getInstance()->emitLocation();  #endif @@ -1256,9 +1256,9 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)  			if(message_name == "js_agent_global_location")  			{  #if LLQTWEBKIT_API_VERSION >= 9 -				F32 x = message_in.getValueReal("x"); -				F32 y = message_in.getValueReal("y"); -				F32 z = message_in.getValueReal("z"); +				F32 x = (F32)message_in.getValueReal("x"); +				F32 y = (F32)message_in.getValueReal("y"); +				F32 z = (F32)message_in.getValueReal("z");  				LLQtWebKit::getInstance()->setAgentGlobalLocation( x, y, z );  				LLQtWebKit::getInstance()->emitLocation();  #endif @@ -1267,7 +1267,7 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)  			if(message_name == "js_agent_orientation")  			{  #if LLQTWEBKIT_API_VERSION >= 9 -				F32 angle = message_in.getValueReal("angle"); +				F32 angle = (F32)message_in.getValueReal("angle");  				LLQtWebKit::getInstance()->setAgentOrientation( angle );  				LLQtWebKit::getInstance()->emitLocation();  #endif @@ -1323,7 +1323,7 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)  			else if(message_name == "set_page_zoom_factor")  			{  #if LLQTWEBKIT_API_VERSION >= 15 -				F32 factor = message_in.getValueReal("factor"); +				F32 factor = (F32)message_in.getValueReal("factor");  				LLQtWebKit::getInstance()->setPageZoomFactor(factor);  #else  				llwarns << "Ignoring setPageZoomFactor message (llqtwebkit version is too old)." << llendl; diff --git a/indra/newview/tests/llworldmipmap_test.cpp b/indra/newview/tests/llworldmipmap_test.cpp index 4c0959d1a9..e7ef017760 100644 --- a/indra/newview/tests/llworldmipmap_test.cpp +++ b/indra/newview/tests/llworldmipmap_test.cpp @@ -100,9 +100,9 @@ namespace tut  	{  		S32 level = mMap->scaleToLevel(0.0);  		ensure("scaleToLevel() test 1 failed", level == LLWorldMipmap::MAP_LEVELS); -		level = mMap->scaleToLevel(LLWorldMipmap::MAP_TILE_SIZE); +		level = mMap->scaleToLevel((F32)LLWorldMipmap::MAP_TILE_SIZE);  		ensure("scaleToLevel() test 2 failed", level == 1); -		level = mMap->scaleToLevel(10 * LLWorldMipmap::MAP_TILE_SIZE); +		level = mMap->scaleToLevel(10.f * LLWorldMipmap::MAP_TILE_SIZE);  		ensure("scaleToLevel() test 3 failed", level == 1);  	}  	// Test 2 : globalToMipmap() diff --git a/indra/viewer_components/updater/llupdaterservice.cpp b/indra/viewer_components/updater/llupdaterservice.cpp index 1888f191e2..2e18218667 100644 --- a/indra/viewer_components/updater/llupdaterservice.cpp +++ b/indra/viewer_components/updater/llupdaterservice.cpp @@ -447,7 +447,7 @@ void LLUpdaterServiceImpl::restartTimer(unsigned int seconds)  	LL_INFOS("UpdaterService") << "will check for update again in " <<   	seconds << " seconds" << LL_ENDL;   	mTimer.start(); -	mTimer.setTimerExpirySec(seconds); +	mTimer.setTimerExpirySec((F32)seconds);  	LLEventPumps::instance().obtain("mainloop").listen(  		sListenerName, boost::bind(&LLUpdaterServiceImpl::onMainLoop, this, _1));  } | 
