From 409c59b70d2d4f2958ccd3ee8db5f7e6e08fe14e Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 1 Feb 2011 17:35:42 -0500 Subject: Fix string-init compile error (g++ 4.4) in llurlentry_stub.cpp. Newer C++ compilers produce a (fatal) warning when you try to initialize a (non-const) char* variable with a string literal: you're supposed to capture such data in a const char*. But as this module is resolving external references declared in ancient message-system headers, we don't have the option to fix the original declaration. Instead use char* _PREHASH_Foo = const_cast("string literal"); // sigh --- indra/llui/tests/llurlentry_stub.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llui/tests') diff --git a/indra/llui/tests/llurlentry_stub.cpp b/indra/llui/tests/llurlentry_stub.cpp index 96ebe83826..c11ad11de9 100644 --- a/indra/llui/tests/llurlentry_stub.cpp +++ b/indra/llui/tests/llurlentry_stub.cpp @@ -193,8 +193,8 @@ LLFontGL* LLFontGL::getFontDefault() return NULL; } -char* _PREHASH_AgentData = "AgentData"; -char* _PREHASH_AgentID = "AgentID"; +char* _PREHASH_AgentData = const_cast("AgentData"); +char* _PREHASH_AgentID = const_cast("AgentID"); LLHost LLHost::invalid(INVALID_PORT,INVALID_HOST_IP_ADDRESS); -- cgit v1.2.3