diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 68d5e4ba2d4585bae9cf0a7594689c1f0d767541..333b6703fe38d3f5abaae6bd1029057e84afd74e 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -2596,7 +2596,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
 
 			// The group notice packet does not have an AgentID.  Obtain one from the name cache.
 			// If last name is "Resident" strip it out so the cache name lookup works.
-			U32 index = original_name.find(" Resident");
+			std::string::size_type index = original_name.find(" Resident");
 			if (index != std::string::npos)
 			{
 				original_name = original_name.substr(0, index);