Update to build on Xcode 6.0: Large (and final) collection of fixes for unused variables, unused const-variables, unused member variables & functions etc. Also removed flags from CMake

meow-7.2.2
callum_linden 2014-10-20 14:00:39 -07:00
parent c853b470db
commit 577a3973ea
34 changed files with 4 additions and 130 deletions

View File

@ -212,9 +212,7 @@ if (LINUX OR DARWIN)
if (CMAKE_COMPILER_IS_GNUCXX)
set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs")
elseif (CMAKE_COMPILER_IS_CLANGXX)
# These unused warnings really ought to be cleaned up over time
# set(UNUSED_WARNINGS "-Wno-overloaded-virtual")
set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs ${UNUSED_WARNINGS}")
set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs")
endif()
if (NOT GCC_DISABLE_FATAL_WARNINGS)

View File

@ -106,9 +106,6 @@ const std::string DEFAULT_SCRIPT_NAME = "New Script"; // *TODO:Translate?
const std::string DEFAULT_SCRIPT_DESC = "(No Description)"; // *TODO:Translate?
// Description and header information
const S32 MAX_EXPORT_SIZE = 1000;
const S32 MAX_HISTORY_COUNT = 10;
const F32 LIVE_HELP_REFRESH_TIME = 1.f;

View File

@ -32,7 +32,6 @@
#include "lllocalcliprect.h"
const S32 UI_TEXTEDITOR_LINE_NUMBER_MARGIN = 32;
const S32 UI_TEXTEDITOR_LINE_NUMBER_DIGITS = 4;
static LLDefaultChildRegistry::Register<LLScriptEditor> r("script_editor");

View File

@ -99,14 +99,11 @@ LLViewerObject* getSelectedParentObject(LLViewerObject *object) ;
// Consts
//
const S32 NUM_SELECTION_UNDO_ENTRIES = 200;
const F32 SILHOUETTE_UPDATE_THRESHOLD_SQUARED = 0.02f;
const S32 MAX_ACTION_QUEUE_SIZE = 20;
const S32 MAX_SILS_PER_FRAME = 50;
const S32 MAX_OBJECTS_PER_PACKET = 254;
// For linked sets
const S32 MAX_CHILDREN_PER_TASK = 255;
const S32 MAX_CHILDREN_PER_PHYSICAL_TASK = 32;
//
// Globals

View File

@ -90,9 +90,6 @@ private:
LLTextBox* mCurrentLookName;
LLTextBox* mOutfitStatus;
// Used to make sure the user's inventory is in memory.
LLCurrentlyWornFetchObserver* mFetchWorn;
// Search string for filtering landmarks and teleport
// history locations
std::string mFilterSubString;

View File

@ -70,10 +70,7 @@ static LLPanelInjector<LLSidepanelInventory> t_inventory("sidepanel_inventory");
static const char * const INBOX_BUTTON_NAME = "inbox_btn";
static const char * const INBOX_LAYOUT_PANEL_NAME = "inbox_layout_panel";
static const char * const MAIN_INVENTORY_LAYOUT_PANEL_NAME = "main_inventory_layout_panel";
static const char * const INVENTORY_LAYOUT_STACK_NAME = "inventory_layout_stack";
static const char * const MARKETPLACE_INBOX_PANEL = "marketplace_inbox";
//

View File

@ -94,16 +94,11 @@ extern S32 MENU_BAR_HEIGHT;
// TODO: these values ought to be in the XML too
const S32 MENU_PARCEL_SPACING = 1; // Distance from right of menu item to parcel information
const S32 SIM_STAT_WIDTH = 8;
const F32 SIM_WARN_FRACTION = 0.75f;
const F32 SIM_FULL_FRACTION = 0.98f;
const LLColor4 SIM_OK_COLOR(0.f, 1.f, 0.f, 1.f);
const LLColor4 SIM_WARN_COLOR(1.f, 1.f, 0.f, 1.f);
const LLColor4 SIM_FULL_COLOR(1.f, 0.f, 0.f, 1.f);
const F32 ICON_TIMER_EXPIRY = 3.f; // How long the balance and health icons should flash after a change.
const F32 ICON_FLASH_FREQUENCY = 2.f;
const S32 TEXT_HEIGHT = 18;
static void onClickVolume(void*);

View File

@ -72,12 +72,6 @@
#include "llfloaterreg.h"
#include "lllocalbitmaps.h"
static const S32 HPAD = 4;
static const S32 VPAD = 4;
static const S32 LINE = 16;
static const S32 FOOTER_HEIGHT = 100;
static const S32 BORDER_PAD = HPAD;
static const S32 TEXTURE_INVENTORY_PADDING = 30;
static const F32 CONTEXT_CONE_IN_ALPHA = 0.0f;
static const F32 CONTEXT_CONE_OUT_ALPHA = 1.f;
static const F32 CONTEXT_FADE_TIME = 0.08f;

View File

@ -338,7 +338,7 @@ private:
// Threads: Ttf
DecodeResponder(LLTextureFetch* fetcher, const LLUUID& id, LLTextureFetchWorker* worker)
: mFetcher(fetcher), mID(id), mWorker(worker)
: mFetcher(fetcher), mID(id)
{
}
@ -354,7 +354,6 @@ private:
private:
LLTextureFetch* mFetcher;
LLUUID mID;
LLTextureFetchWorker* mWorker; // debug only (may get deleted from under us, use mFetcher/mID)
};
struct Compare

View File

@ -48,7 +48,6 @@
const S32 MAX_ALLOWED_MSG_WIDTH = 400;
const F32 DEFAULT_BUTTON_DELAY = 0.5f;
const S32 MSG_PAD = 8;
/*static*/ LLControlGroup* LLToastAlertPanel::sSettings = NULL;
/*static*/ LLToastAlertPanel::URLLoader* LLToastAlertPanel::sURLLoader;

View File

@ -60,8 +60,6 @@ private:
static const S32 DEFAULT_MESSAGE_MAX_LINE_COUNT;
LLButton* mSaveInventoryBtn;
LLUUID mGroupID;
LLOfferInfo* mInventoryOffer;
};

View File

@ -65,8 +65,7 @@ const std::string REGION_BLOCKS_TERRAFORM_MSG = "This region does not allow terr
const S32 LAND_BRUSH_SIZE_COUNT = 3;
const F32 LAND_BRUSH_SIZE[LAND_BRUSH_SIZE_COUNT] = {1.0f, 2.0f, 4.0f};
const S32 LAND_STEPS = 3;
const F32 LAND_METERS_PER_SECOND = 1.0f;
enum
{
E_LAND_LEVEL = 0,

View File

@ -52,14 +52,8 @@
#include "llfloatertools.h"
#include "llviewercontrol.h"
const S32 BUTTON_HEIGHT = 16;
const S32 BUTTON_WIDTH_SMALL = 32;
const S32 BUTTON_WIDTH_BIG = 48;
const S32 HPAD = 4;
extern LLControlGroup gSavedSettings;
// we use this in various places instead of NULL
static LLPointer<LLTool> sNullTool(new LLTool(std::string("null"), NULL));

View File

@ -61,7 +61,6 @@ BOOL gCameraBtnOrbit = FALSE;
BOOL gCameraBtnPan = FALSE;
const S32 SLOP_RANGE = 4;
const F32 FOCUS_OFFSET_FACTOR = 1.f;
//
// Camera - shared functionality

View File

@ -38,8 +38,6 @@
#error "Channel or Version information is undefined"
#endif
const char * const LL_CHANNEL = LL_VIEWER_CHANNEL;
//
// Set the version numbers in indra/VIEWER_VERSION
//

View File

@ -53,7 +53,6 @@ const F32 FLY_FRAMES = 4;
const F32 NUDGE_TIME = 0.25f; // in seconds
const S32 NUDGE_FRAMES = 2;
const F32 ORBIT_NUDGE_RATE = 0.05f; // fraction of normal speed
const F32 YAW_NUDGE_RATE = 0.05f; // fraction of normal speed
struct LLKeyboardActionRegistry
: public LLRegistrySingleton<std::string, boost::function<void (EKeystate keystate)>, LLKeyboardActionRegistry>

View File

@ -128,10 +128,7 @@ extern void on_new_message(const LLSD& msg);
//
// Constants
//
const F32 BIRD_AUDIBLE_RADIUS = 32.0f;
const F32 SIT_DISTANCE_FROM_TARGET = 0.25f;
const F32 CAMERA_POSITION_THRESHOLD_SQUARED = 0.001f * 0.001f;
static const F32 LOGOUT_REPLY_TIME = 3.f; // Wait this long after LogoutReply before quitting.
// Determine how quickly residents' scripts can issue question dialogs
// Allow bursts of up to 5 dialogs in 10 seconds. 10*2=20 seconds recovery if throttle kicks in
@ -7117,8 +7114,6 @@ void process_user_info_reply(LLMessageSystem* msg, void**)
//---------------------------------------------------------------------------
const S32 SCRIPT_DIALOG_MAX_BUTTONS = 12;
const S32 SCRIPT_DIALOG_BUTTON_STR_SIZE = 24;
const S32 SCRIPT_DIALOG_MAX_MESSAGE_SIZE = 512;
const char* SCRIPT_DIALOG_HEADER = "Script Dialog:\n";
bool callback_script_dialog(const LLSD& notification, const LLSD& response)

View File

@ -42,8 +42,6 @@
#include "llvovolume.h"
const F32 PART_SIM_BOX_SIDE = 16.f;
const F32 PART_SIM_BOX_OFFSET = 0.5f*PART_SIM_BOX_SIDE;
const F32 PART_SIM_BOX_RAD = 0.5f*F_SQRT3*PART_SIM_BOX_SIDE;
//static
S32 LLViewerPartSim::sMaxParticleCount = 0;
@ -311,7 +309,6 @@ void LLViewerPartGroup::updateParticles(const F32 lastdt)
if (part->mFlags & LLPartData::LL_PART_WIND_MASK)
{
LLVector3 tempVel(part->mVelocity);
part->mVelocity *= 1.f - 0.1f*dt;
part->mVelocity += 0.1f*dt*regionp->mWind.getVelocity(regionp->getPosRegionFromAgent(part->mPosAgent));
}

View File

@ -87,8 +87,6 @@
// out the two lists of capabilities for analysis.
//#define DEBUG_CAPS_GRANTS
const F32 WATER_TEXTURE_SCALE = 8.f; // Number of times to repeat the water texture across a region
const S16 MAX_MAP_DIST = 10;
// The server only keeps our pending agent info for 60 seconds.
// We want to allow for seed cap retry, but its not useful after that 60 seconds.
// Give it 3 chances, each at 18 seconds to give ourselves a few seconds to connect anyways if we give up.
@ -1924,7 +1922,6 @@ public:
}
else if( i != you_index)
{
U32 loc = x << 16 | y << 8 | z;
U32 pos = 0x0;
pos |= x;
pos <<= 8;

View File

@ -39,9 +39,6 @@
#include "pipeline.h"
#include "llviewercontrol.h"
static const S32 BAKE_UPLOAD_ATTEMPTS = 7;
static const F32 BAKE_UPLOAD_RETRY_DELAY = 2.f; // actual delay grows by power of 2 each attempt
// runway consolidate
extern std::string self_av_string();

View File

@ -169,8 +169,7 @@ public:
mImage(image),
mLabel(utf8str_to_wstring(inv_item->getName())),
mItem(inv_item),
mEditor(editor),
mHasMouseHover(false)
mEditor(editor)
{
mStyle = new LLStyle(LLStyle::Params().font(LLFontGL::getFontSansSerif()));
@ -262,8 +261,6 @@ private:
std::string mToolTip;
LLPointer<LLInventoryItem> mItem;
LLTextEditor& mEditor;
bool mHasMouseHover;
};

View File

@ -452,7 +452,6 @@ void LLViewerTexture::initClass()
// tuning params
const F32 discard_bias_delta = .25f;
const F32 discard_delta_time = 0.5f;
const S32 min_non_tex_system_mem = (128<<20); // 128 MB
// non-const (used externally
F32 texmem_lower_bound_scale = 0.85f;
F32 texmem_middle_bound_scale = 0.925f;

View File

@ -1258,9 +1258,6 @@ LLPointer<LLImageJ2C> LLViewerTextureList::convertToUploadFile(LLPointer<LLImage
return compressedImage;
}
const S32 MIN_VIDEO_RAM = 32;
const S32 MAX_VIDEO_RAM = 512; // 512MB max for performance reasons.
// Returns min setting for TextureMemory (in MB)
S32Megabytes LLViewerTextureList::getMinVideoRamSetting()
{

View File

@ -134,10 +134,6 @@ const LLUUID ANIM_AGENT_PHYSICS_MOTION = LLUUID("7360e029-3cb8-ebc4-863e-212df44
//-----------------------------------------------------------------------------
// Constants
//-----------------------------------------------------------------------------
const S32 MIN_PIXEL_AREA_FOR_COMPOSITE = 1024;
const F32 SHADOW_OFFSET_AMT = 0.03f;
const F32 DELTA_TIME_MIN = 0.01f; // we clamp measured deltaTime to this
const F32 DELTA_TIME_MAX = 0.2f; // range to insure stability of computations.
@ -145,22 +141,15 @@ const F32 PELVIS_LAG_FLYING = 0.22f;// pelvis follow half life while flying
const F32 PELVIS_LAG_WALKING = 0.4f; // ...while walking
const F32 PELVIS_LAG_MOUSELOOK = 0.15f;
const F32 MOUSELOOK_PELVIS_FOLLOW_FACTOR = 0.5f;
const F32 PELVIS_LAG_WHEN_FOLLOW_CAM_IS_ON = 0.0001f; // not zero! - something gets divided by this!
const F32 TORSO_NOISE_AMOUNT = 1.0f; // Amount of deviation from up-axis, in degrees
const F32 TORSO_NOISE_SPEED = 0.2f; // Time scale factor on torso noise.
const F32 BREATHE_ROT_MOTION_STRENGTH = 0.05f;
const F32 BREATHE_SCALE_MOTION_STRENGTH = 0.005f;
const F32 MIN_SHADOW_HEIGHT = 0.f;
const F32 MAX_SHADOW_HEIGHT = 0.3f;
const S32 MIN_REQUIRED_PIXEL_AREA_BODY_NOISE = 10000;
const S32 MIN_REQUIRED_PIXEL_AREA_BREATHE = 10000;
const S32 MIN_REQUIRED_PIXEL_AREA_PELVIS_FIX = 40;
const S32 TEX_IMAGE_SIZE_SELF = 512;
const S32 TEX_IMAGE_AREA_SELF = TEX_IMAGE_SIZE_SELF * TEX_IMAGE_SIZE_SELF;
const S32 TEX_IMAGE_SIZE_OTHER = 512 / 4; // The size of local textures for other (!isSelf()) avatars
const F32 HEAD_MOVEMENT_AVG_TIME = 0.9f;

View File

@ -51,7 +51,6 @@
const S32 GRASS_MAX_BLADES = 32;
const F32 GRASS_BLADE_BASE = 0.25f; // Width of grass at base
const F32 GRASS_BLADE_TOP = 0.25f; // Width of grass at top
const F32 GRASS_BLADE_HEIGHT = 0.5f; // meters
const F32 GRASS_DISTRIBUTION_SD = 0.15f; // empirically defined

View File

@ -70,7 +70,6 @@ const F32 DEFAULT_MAXIMUM_GESTICULATION_AMPLITUDE = 1.0f;
//--------------------------------------------------------------------------------------
// other constants
//--------------------------------------------------------------------------------------
const F32 ONE_HALF = 1.0f; // to clarify intent and reduce magic numbers in the code.
const LLVector3 WORLD_UPWARD_DIRECTION = LLVector3( 0.0f, 0.0f, 1.0f ); // Z is up in SL
//------------------------------------------------------------------

View File

@ -44,8 +44,6 @@
#include "pipeline.h"
#include "llspatialpartition.h"
const F32 MAX_PART_LIFETIME = 120.f;
extern U64MicrosecondsImplicit gFrameTime;
LLPointer<LLVertexBuffer> LLVOPartGroup::sVB = NULL;

View File

@ -62,8 +62,6 @@ static const S32 NUM_TILES = NUM_TILES_X * NUM_TILES_Y;
static const F32 SUN_DISK_RADIUS = 0.5f;
static const F32 MOON_DISK_RADIUS = SUN_DISK_RADIUS * 0.9f;
static const F32 SUN_INTENSITY = 1e5;
static const F32 SUN_DISK_INTENSITY = 24.f;
// Texture coordinates:
static const LLVector2 TEX00 = LLVector2(0.f, 0.f);
@ -619,21 +617,6 @@ static inline LLColor3 colorMix(LLColor3 const & left, LLColor3 const & right, F
return (left + ((right - left) * amount));
}
static inline F32 texture2D(LLPointer<LLImageRaw> const & tex, LLVector2 const & uv)
{
U16 w = tex->getWidth();
U16 h = tex->getHeight();
U16 r = U16(uv[0] * w) % w;
U16 c = U16(uv[1] * h) % h;
U8 const * imageBuffer = tex->getData();
U8 sample = imageBuffer[r * w + c];
return sample / 255.f;
}
static inline LLColor3 smear(F32 val)
{
return LLColor3(val, val, val);

View File

@ -396,9 +396,6 @@ void LLVOTree::idleUpdate(LLAgent &agent, const F64 &time)
mTrunkLOD = trunk_LOD;
}
const F32 TREE_BLEND_MIN = 1.f;
const F32 TREE_BLEND_RANGE = 1.f;
void LLVOTree::render(LLAgent &agent)
{
}

View File

@ -78,10 +78,8 @@
#include "llvocache.h"
#include "llmaterialmgr.h"
const S32 MIN_QUIET_FRAMES_COALESCE = 30;
const F32 FORCE_SIMPLE_RENDER_AREA = 512.f;
const F32 FORCE_CULL_AREA = 8.f;
const F32 MAX_LOD_DISTANCE = 24.f;
U32 JOINT_COUNT_REQUIRED_FOR_FULLRIG = 20;
BOOL gAnimateTextures = TRUE;

View File

@ -43,9 +43,6 @@
#include "pipeline.h"
#include "llspatialpartition.h"
const BOOL gUseRoam = FALSE;
///////////////////////////////////
template<class T> inline T LERP(T a, T b, F32 factor)
@ -53,12 +50,6 @@ template<class T> inline T LERP(T a, T b, F32 factor)
return a + (b - a) * factor;
}
const U32 N_RES_HALF = (N_RES >> 1);
const U32 WIDTH = (N_RES * WAVE_STEP); //128.f //64 // width of wave tile, in meters
const F32 WAVE_STEP_INV = (1. / WAVE_STEP);
LLVOWater::LLVOWater(const LLUUID &id,
const LLPCode pcode,
LLViewerRegion *regionp) :

View File

@ -70,7 +70,6 @@ U32 gAgentPauseSerialNum = 0;
//
// Constants
//
const S32 MAX_NUMBER_OF_CLOUDS = 750;
const S32 WORLD_PATCH_SIZE = 16;
extern LLColor4U MAX_WATER_COLOR;

View File

@ -67,7 +67,6 @@ const F32 OCEAN_GREEN = (F32)(0x47)/255.f;
const F32 OCEAN_BLUE = (F32)(0x5F)/255.f;
const F32 GODLY_TELEPORT_HEIGHT = 200.f;
const S32 SCROLL_HINT_WIDTH = 65;
const F32 BIG_DOT_RADIUS = 5.f;
BOOL LLWorldMapView::sHandledLastClick = FALSE;

View File

@ -207,15 +207,9 @@ F32 LLPipeline::CameraDoFResScale;
F32 LLPipeline::RenderAutoHideSurfaceAreaLimit;
LLTrace::EventStatHandle<S64> LLPipeline::sStatBatchSize("renderbatchsize");
const F32 BACKLIGHT_DAY_MAGNITUDE_AVATAR = 0.2f;
const F32 BACKLIGHT_NIGHT_MAGNITUDE_AVATAR = 0.1f;
const F32 BACKLIGHT_DAY_MAGNITUDE_OBJECT = 0.1f;
const F32 BACKLIGHT_NIGHT_MAGNITUDE_OBJECT = 0.08f;
const S32 MAX_OFFSCREEN_GEOMETRY_CHANGES_PER_FRAME = 10;
const U32 REFLECTION_MAP_RES = 128;
const U32 DEFERRED_VB_MASK = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_TEXCOORD1;
// Max number of occluders to search for. JC
const S32 MAX_OCCLUDER_COUNT = 2;
extern S32 gBoxFrame;
//extern BOOL gHideSelectedObjects;
@ -410,16 +404,6 @@ static LLPipelineListener sPipelineListener;
static LLCullResult* sCull = NULL;
static const U32 gl_cube_face[] =
{
GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB,
GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB,
GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB,
GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB,
GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB,
GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB,
};
void validate_framebuffer_object();