Clean up warnings

This commit is contained in:
elasota
2020-11-08 13:40:47 -05:00
parent 4c6e646133
commit a28a4cd73d
11 changed files with 151 additions and 177 deletions

View File

@@ -147,8 +147,6 @@ void CenterDialog (SInt16 dialogID)
void GetDialogRect (Rect *bounds, short dialogID)
{
Byte wasState;
Handle dlogHandle = PortabilityLayer::ResourceManager::GetInstance()->GetAppResource('DLOG', dialogID).StaticCast<void>();
if (dlogHandle != nil)
{
@@ -343,10 +341,8 @@ void ZoomOutAlertRect (short alertID)
void FlashDialogButton (Dialog *theDialog, short itemNumber)
{
Rect itemRect;
ControlHandle itemHandle;
UInt32 dummyLong;
short itemType;
PortabilityLayer::Widget *widget = theDialog->GetItems()[itemNumber - 1].GetWidget();
@@ -445,9 +441,7 @@ void ToggleDialogItemValue (Dialog *theDialog, short item)
void SetDialogNumToStr (Dialog *theDialog, short item, long theNumber)
{
Str255 theString;
Rect itemRect;
ControlHandle itemHandle;
short itemType;
NumToString(theNumber, theString);
PortabilityLayer::Widget *widget = theDialog->GetItems()[item - 1].GetWidget();
@@ -570,7 +564,7 @@ void DrawDialogUserText (Dialog *dial, short item, StringPtr text, Boolean inver
{
ControlHandle iHandle;
Str255 stringCopy;
short iType, i, inset;
short inset;
DrawSurface *surface = dial->GetWindow()->GetDrawSurface();
@@ -622,9 +616,7 @@ void DrawDialogUserText (Dialog *dial, short item, StringPtr text, Boolean inver
void DrawDialogUserText2 (Dialog *dial, short item, StringPtr text)
{
;
Str255 stringCopy;
short iType;
DrawSurface *surface = dial->GetWindow()->GetDrawSurface();
PortabilityLayer::RenderedFont *appFont = GetApplicationFont(9, PortabilityLayer::FontFamilyFlag_None, true);

View File

@@ -108,13 +108,12 @@ void DoHighScores (void)
void DrawHighScores (DrawSurface *surface)
{
DrawSurface *tempMap, *tempMask;
DrawSurface *wasCPort;
PLError_t theErr;
houseType *thisHousePtr;
Rect tempRect, tempRect2;
Str255 tempStr;
short scoreLeft, bannerWidth, i, dropIt;
char wasState;
PortabilityLayer::ResolveCachingColor blackColor = PortabilityLayer::RGBAColor::Create(0, 0, 0, 255);
PortabilityLayer::ResolveCachingColor yellowColor = PortabilityLayer::RGBAColor::Create(255, 255, 0, 255);
PortabilityLayer::ResolveCachingColor cyanColor = PortabilityLayer::RGBAColor::Create(0, 255, 255, 255);
@@ -277,7 +276,6 @@ void SortHighScores (void)
houseType *thisHousePtr;
long greatest;
short i, h, which;
char wasState;
thisHousePtr = *thisHouse;
@@ -313,7 +311,6 @@ void ZeroHighScores (void)
{
houseType *thisHousePtr;
short i;
char wasState;
thisHousePtr = *thisHouse;
@@ -356,7 +353,6 @@ Boolean TestHighScore (void)
{
houseType *thisHousePtr;
short placing, i;
char wasState;
if (resumedSavedGame)
return (false);

View File

@@ -602,8 +602,6 @@ Boolean KeepObjectLegal (void)
#ifndef COMPILEDEMO
void WrapBannerAndTrailer (void)
{
char wasState;
WrapText((*thisHouse)->banner, 40);
WrapText((*thisHouse)->trailer, 64);
}
@@ -615,7 +613,6 @@ void WrapBannerAndTrailer (void)
void ValidateNumberOfRooms (void)
{
long countedRooms, reportsRooms;
char wasState;
reportsRooms = (long)(*thisHouse)->nRooms;
countedRooms = (GetHandleSize(thisHouse.StaticCast<void>()) -
@@ -637,7 +634,6 @@ void CheckDuplicateFloorSuite (void)
#define kRoomsTimesSuites 8192
short i, numRooms, bitPlace;
char *pidgeonHoles;
char wasState;
pidgeonHoles = (char *)NewPtrClear(sizeof(char) * kRoomsTimesSuites);
if (pidgeonHoles == nil)
@@ -672,7 +668,6 @@ void CheckDuplicateFloorSuite (void)
void CompressHouse (void)
{
short wasFirstRoom, roomNumber, probe;
char wasState;
Boolean compressing, probing;
wasFirstRoom = (*thisHouse)->firstRoom;
@@ -720,7 +715,6 @@ void LopOffExtraRooms (void)
{
long newSize;
short r, count;
char wasState;
Str255 message;
count = 0;
@@ -756,7 +750,6 @@ void LopOffExtraRooms (void)
void ValidateRoomNumbers (void)
{
short i, numRooms;
char wasState;
Str255 message;
numRooms = (*thisHouse)->nRooms;
@@ -796,7 +789,6 @@ void ValidateRoomNumbers (void)
void CountUntitledRooms (void)
{
short i, numRooms;
char wasState;
numRooms = (*thisHouse)->nRooms;
for (i = 0; i < numRooms; i++)
@@ -814,7 +806,6 @@ void CountUntitledRooms (void)
void CheckRoomNameLength (void)
{
short i, numRooms;
char wasState;
numRooms = (*thisHouse)->nRooms;
for (i = 0; i < numRooms; i++)
@@ -837,7 +828,6 @@ void CheckRoomNameLength (void)
void MakeSureNumObjectsJives (void)
{
short i, h, numRooms, count;
char wasState;
numRooms = (*thisHouse)->nRooms;
for (i = 0; i < numRooms; i++)
@@ -866,7 +856,6 @@ void MakeSureNumObjectsJives (void)
void KeepAllObjectsLegal (void)
{
short i, h, numRooms;
char wasState;
Str255 message;
numRooms = (*thisHouse)->nRooms;
@@ -901,7 +890,6 @@ void KeepAllObjectsLegal (void)
void CheckForStaircasePairs (void)
{
short i, h, g, numRooms, neighbor;
char wasState;
Boolean hasStairs;
Str255 message;

View File

@@ -176,8 +176,6 @@ void RecomputeInterfaceRects (void)
void VariableInit (void)
{
short i;
menusUp = false;
quitting = false;
houseOpen = false;