From b5b6e556ed7e9fa6bdea2365e82765981ee9f28c Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Thu, 30 Sep 2010 02:17:43 +0200 Subject: SNOW-86: Dangerous macro leads to possible wrong code See http://redmine.imprudenceviewer.org/issues/571 This patch appeared to already have been partially applied. I added more semi-colons after all llendl (and LLENDL) macros, and wrapped the lllog ... llendl construct into do { ... } while(0) as is usual for macros that mimic a single statement. The patch was double checked with regular expression greps and a compile. --- linden/indra/newview/llmaniprotate.cpp | 4 ++-- linden/indra/newview/llpreviewscript.cpp | 2 +- linden/indra/newview/llstatview.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'linden/indra/newview') diff --git a/linden/indra/newview/llmaniprotate.cpp b/linden/indra/newview/llmaniprotate.cpp index ad7399e..df503ec 100644 --- a/linden/indra/newview/llmaniprotate.cpp +++ b/linden/indra/newview/llmaniprotate.cpp @@ -1233,9 +1233,9 @@ LLVector3 LLManipRotate::getConstraintAxis() else { #ifndef LL_RELEASE_FOR_DOWNLOAD - llerrs << "Got bogus hit part in LLManipRotate::getConstraintAxis():" << mManipPart << llendl + llerrs << "Got bogus hit part in LLManipRotate::getConstraintAxis():" << mManipPart << llendl; #else - llwarns << "Got bogus hit part in LLManipRotate::getConstraintAxis():" << mManipPart << llendl + llwarns << "Got bogus hit part in LLManipRotate::getConstraintAxis():" << mManipPart << llendl; #endif axis.mV[0] = 1.f; } diff --git a/linden/indra/newview/llpreviewscript.cpp b/linden/indra/newview/llpreviewscript.cpp index d8c3aa9..bde7242 100644 --- a/linden/indra/newview/llpreviewscript.cpp +++ b/linden/indra/newview/llpreviewscript.cpp @@ -1396,7 +1396,7 @@ void LLPreviewLSL::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 else { llwarns << "Inventory item for script " << info->mItemUUID - << " is no longer in agent inventory." << llendl + << " is no longer in agent inventory." << llendl; } // Find our window and close it if requested. diff --git a/linden/indra/newview/llstatview.cpp b/linden/indra/newview/llstatview.cpp index a38c012..9a3fcff 100644 --- a/linden/indra/newview/llstatview.cpp +++ b/linden/indra/newview/llstatview.cpp @@ -76,7 +76,7 @@ LLStatBar *LLStatView::addStat(const std::string& name, LLStat *statp, // if (getStatBar(name)) // { -// llinfos << "LLStatView::addStat - Stat already exists!" << llendl +// llinfos << "LLStatView::addStat - Stat already exists!" << llendl; // return NULL; // } -- cgit v1.1