From b65980cd4ea7e1a8052a0d2c5cb6edd73d35b89c Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 19 Jan 2021 17:50:52 -0500 Subject: [PATCH] Remove unused local variables and functions --- gflib/malloc.c | 2 +- gflib/text.c | 2 -- src/battle_anim_effects_3.c | 1 - src/battle_anim_flying.c | 1 - src/battle_anim_normal.c | 2 -- src/battle_anim_throw.c | 2 -- src/battle_anim_water.c | 2 -- src/battle_controller_link_opponent.c | 1 - src/battle_controller_opponent.c | 1 - src/battle_controller_recorded_opponent.c | 1 - src/battle_controller_safari.c | 2 -- src/battle_interface.c | 1 - src/berry_blender.c | 2 +- src/berry_crush.c | 4 +--- src/cable_club.c | 3 --- src/contest.c | 1 - src/credits.c | 2 -- src/decoration.c | 2 +- src/easy_chat.c | 1 - src/ereader_screen.c | 1 - src/event_object_movement.c | 1 - src/evolution_scene.c | 1 - src/faraway_island.c | 1 - src/fieldmap.c | 2 +- src/fldeff_cut.c | 1 - src/fldeff_escalator.c | 2 -- src/intro.c | 3 --- src/item_menu.c | 1 - src/librfu_rfu.c | 1 - src/match_call.c | 1 - src/mauville_old_man.c | 1 - src/minigame_countdown.c | 1 - src/overworld.c | 1 - src/palette.c | 2 +- src/party_menu.c | 2 +- src/player_pc.c | 1 - src/pokeblock_feed.c | 1 - src/pokedex.c | 3 --- src/pokedex_area_screen.c | 1 - src/pokemon.c | 1 - src/pokemon_storage_system.c | 2 +- src/record_mixing.c | 1 - src/script.c | 2 -- src/shop.c | 1 - src/starter_choose.c | 1 - src/tv.c | 5 ----- 46 files changed, 8 insertions(+), 66 deletions(-) diff --git a/gflib/malloc.c b/gflib/malloc.c index 4d1a9fe5c..38fc8939e 100644 --- a/gflib/malloc.c +++ b/gflib/malloc.c @@ -2,7 +2,7 @@ static void *sHeapStart; static u32 sHeapSize; -static u32 malloc_c_unused_0300000c; // needed to align dma3_manager.o(.bss) +static u32 sFiller; // needed to align dma3_manager.o(.bss) #define MALLOC_SYSTEM_ID 0xA3A3 diff --git a/gflib/text.c b/gflib/text.c index 4cbad1376..ffce2cb56 100644 --- a/gflib/text.c +++ b/gflib/text.c @@ -165,7 +165,6 @@ bool16 AddTextPrinter(struct TextPrinterTemplate *printerTemplate, u8 speed, voi { int i; u16 j; - u8 *ptr; if (!gFonts) return FALSE; @@ -1235,7 +1234,6 @@ s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing) bool8 isJapanese; int minGlyphWidth; u32 (*func)(u16 glyphId, bool32 isJapanese); - s32 result; int localLetterSpacing; u32 lineWidth; const u8 *bufferPointer; diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index 9e50a8477..f73a2dee7 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -4947,7 +4947,6 @@ static void AnimTask_OdorSleuthMovementWaitFinish(u8 taskId) static void MoveOdorSleuthClone(struct Sprite *sprite) { - int zero = 0; if (++sprite->data[1] > 1) { sprite->data[1] = 0; diff --git a/src/battle_anim_flying.c b/src/battle_anim_flying.c index f8d47f4ec..7d96fed8c 100644 --- a/src/battle_anim_flying.c +++ b/src/battle_anim_flying.c @@ -708,7 +708,6 @@ static void sub_810E520(struct Sprite *sprite) } } data->unk0_0d = 0; - data->unk2; } data->unk0_1 = 0; break; diff --git a/src/battle_anim_normal.c b/src/battle_anim_normal.c index f7df9a4a9..e32ff3151 100644 --- a/src/battle_anim_normal.c +++ b/src/battle_anim_normal.c @@ -564,8 +564,6 @@ static void AnimTask_BlendColorCycleExcludeLoop(u8 taskId) // See AnimTask_BlendColorCycle. Same, but selects palette by ANIM_TAG_* void AnimTask_BlendColorCycleByTag(u8 taskId) { - u8 paletteIndex; - gTasks[taskId].tPalTag = gBattleAnimArgs[0]; gTasks[taskId].tDelay = gBattleAnimArgs[1]; gTasks[taskId].tNumBlends = gBattleAnimArgs[2]; diff --git a/src/battle_anim_throw.c b/src/battle_anim_throw.c index fef301326..0da766036 100755 --- a/src/battle_anim_throw.c +++ b/src/battle_anim_throw.c @@ -1551,8 +1551,6 @@ static void SpriteCB_Ball_Block_Step(struct Sprite *sprite) static void LoadBallParticleGfx(u8 ballId) { - u8 taskId; - if (GetSpriteTileStartByTag(sBallParticleSpriteSheets[ballId].tag) == 0xFFFF) { LoadCompressedSpriteSheetUsingHeap(&sBallParticleSpriteSheets[ballId]); diff --git a/src/battle_anim_water.c b/src/battle_anim_water.c index 2bb90e585..f157102b0 100644 --- a/src/battle_anim_water.c +++ b/src/battle_anim_water.c @@ -881,8 +881,6 @@ static void AnimTask_CreateSurfWave_Step1(u8 taskId) u16 rgbBuffer; u16 *BGptrX = &gBattle_BG1_X; u16 *BGptrY = &gBattle_BG1_Y; - u32 palOffset; - u16 palNum; *BGptrX += gTasks[taskId].data[0]; *BGptrY += gTasks[taskId].data[1]; diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index 269b4c1b4..718fe30c9 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -1693,7 +1693,6 @@ static void LinkOpponentHandleIntroSlide(void) static void LinkOpponentHandleIntroTrainerBallThrow(void) { - u8 paletteNum; u8 taskId; SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]); diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index 2f1153612..d241d335f 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -1858,7 +1858,6 @@ static void OpponentHandleIntroSlide(void) static void OpponentHandleIntroTrainerBallThrow(void) { - u8 paletteNum; u8 taskId; SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]); diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index 895ca6b39..23269dbad 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -1633,7 +1633,6 @@ static void RecordedOpponentHandleIntroSlide(void) static void RecordedOpponentHandleIntroTrainerBallThrow(void) { - u8 paletteNum; u8 taskId; SetSpritePrimaryCoordsFromSecondaryCoords(&gSprites[gBattlerSpriteIds[gActiveBattler]]); diff --git a/src/battle_controller_safari.c b/src/battle_controller_safari.c index b5a8b1bb6..b357c689f 100644 --- a/src/battle_controller_safari.c +++ b/src/battle_controller_safari.c @@ -470,8 +470,6 @@ static void SafariHandleChooseMove(void) static void SafariHandleChooseItem(void) { - s32 i; - BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK); gBattlerControllerFuncs[gActiveBattler] = SafariOpenPokeblockCase; gBattlerInMenuId = gActiveBattler; diff --git a/src/battle_interface.c b/src/battle_interface.c index adbef019d..df123630c 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -1897,7 +1897,6 @@ static void UpdateNickInHealthbox(u8 healthboxSpriteId, struct Pokemon *mon) { u8 nickname[POKEMON_NAME_LENGTH + 1]; void *ptr; - const u8 *genderTxt; u32 windowId, spriteTileNum; u8 *windowTileData; u16 species; diff --git a/src/berry_blender.c b/src/berry_blender.c index 573affbd5..08a25c58a 100644 --- a/src/berry_blender.c +++ b/src/berry_blender.c @@ -2390,7 +2390,7 @@ static s16 Debug_GetGameTimeStage(void) static void CalculatePokeblock(struct BlenderBerry *berries, struct Pokeblock *pokeblock, u8 numPlayers, u8 *flavors, u16 maxRPM) { s32 i, j; - s32 multiuseVar, var2; + s32 multiuseVar; u8 numNegatives; for (i = 0; i < FLAVOR_COUNT + 1; i++) diff --git a/src/berry_crush.c b/src/berry_crush.c index 90bc7150d..c3ff4da7f 100755 --- a/src/berry_crush.c +++ b/src/berry_crush.c @@ -1573,7 +1573,6 @@ static void Task_ShowBerryCrushRankings(u8 taskId) u8 i = 0, j, xPos, yPos; u32 score = 0; s16 *data = gTasks[taskId].data; - u8 *str; switch (data[0]) { @@ -1714,8 +1713,7 @@ void sub_8022588(struct BerryCrushGame *r5) void sub_8022600(struct BerryCrushGame *r6) { - u8 r7, r2; - u8 *r4; + u8 r7; for (r7 = 0; r7 < r6->unk9; ++r7) { diff --git a/src/cable_club.c b/src/cable_club.c index 64bc9187a..cd0baefcd 100644 --- a/src/cable_club.c +++ b/src/cable_club.c @@ -128,8 +128,6 @@ static void UpdateLinkPlayerCountDisplay(u8 taskId, u8 numPlayers) static u32 ExchangeDataAndGetLinkupStatus(u8 minPlayers, u8 maxPlayers) { - int playerCount; - switch (GetLinkPlayerDataExchangeStatusTimed(minPlayers, maxPlayers)) { case EXCHANGE_COMPLETE: @@ -511,7 +509,6 @@ static void FinishLinkup(u16 *linkupStatus, u32 taskId) static void Task_LinkupAwaitTrainerCardData(u8 taskId) { u8 index; - struct TrainerCard *trainerCards; if (CheckLinkErrored(taskId) == TRUE) return; diff --git a/src/contest.c b/src/contest.c index 40a0eac66..e7c420448 100644 --- a/src/contest.c +++ b/src/contest.c @@ -4422,7 +4422,6 @@ static void CalculateAppealMoveImpact(u8 contestant) u16 move; u8 effect; u8 rnd; - bool8 canUseTurn; s32 i; eContestantStatus[contestant].appeal = 0; diff --git a/src/credits.c b/src/credits.c index 41d1c1686..0fc838b22 100644 --- a/src/credits.c +++ b/src/credits.c @@ -1305,8 +1305,6 @@ static void sub_8175808(u8 taskIdA) static void c2_080C9BFC(u8 taskIdA) { - u16 backup; - SetVBlankCallback(NULL); if (sub_8176AB0(gTasks[taskIdA].data[TDA_7], taskIdA)) diff --git a/src/decoration.c b/src/decoration.c index b97ab4321..484398aba 100644 --- a/src/decoration.c +++ b/src/decoration.c @@ -113,7 +113,7 @@ EWRAM_DATA static u16 sDecorationsCursorPos = 0; EWRAM_DATA static u16 sDecorationsScrollOffset = 0; EWRAM_DATA u8 gCurDecorationIndex = 0; EWRAM_DATA static u8 sCurDecorationCategory = DECORCAT_DESK; -EWRAM_DATA static u32 filler_0203a174[2] = {}; +EWRAM_DATA static u32 sFiller[2] = {}; EWRAM_DATA static struct DecorationPCContext sDecorationContext = {}; EWRAM_DATA static u8 sDecorMenuWindowIds[WINDOW_COUNT] = {}; EWRAM_DATA static struct DecorationItemsMenu *sDecorationItemsMenu = NULL; diff --git a/src/easy_chat.c b/src/easy_chat.c index 2590eea1a..6bb77bc84 100644 --- a/src/easy_chat.c +++ b/src/easy_chat.c @@ -4073,7 +4073,6 @@ static void sub_811D864(u8 arg0, u8 arg1) { int i, j; u16 easyChatWord; - u8 *str; int y; int var0; diff --git a/src/ereader_screen.c b/src/ereader_screen.c index 3f2cf3217..d27605c1d 100755 --- a/src/ereader_screen.c +++ b/src/ereader_screen.c @@ -211,7 +211,6 @@ static u32 sub_81D4EE4(u8 *arg0, u16 *arg1) void task_add_00_ereader(void) { - int value; struct Unk81D5014 *data; u8 taskId = CreateTask(sub_81D5084, 0); data = (struct Unk81D5014 *)gTasks[taskId].data; diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 12ef4acdc..7e9e7347c 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -130,7 +130,6 @@ static struct ObjectEventTemplate *FindObjectEventTemplateByLocalId(u8 localId, static void ClearObjectEventMovement(struct ObjectEvent *, struct Sprite *); static void ObjectEventSetSingleMovement(struct ObjectEvent *, struct Sprite *, u8); static void oamt_npc_ministep_reset(struct Sprite *, u8, u8); -static void UpdateObjectEventSpriteSubpriorityAndVisibility(struct Sprite *); static void InitSpriteForFigure8Anim(struct Sprite *sprite); static bool8 AnimateSpriteInFigure8(struct Sprite *sprite); static void UpdateObjectEventSprite(struct Sprite *); diff --git a/src/evolution_scene.c b/src/evolution_scene.c index d41bc5970..a8de8a555 100644 --- a/src/evolution_scene.c +++ b/src/evolution_scene.c @@ -60,7 +60,6 @@ static void CB2_TradeEvolutionSceneUpdate(void); static void EvoDummyFunc(void); static void VBlankCB_EvolutionScene(void); static void VBlankCB_TradeEvolutionScene(void); -static void sub_81150D8(void); static void sub_8140134(void); static void EvoScene_DoMonAnimation(u8 monSpriteId, u16 speciesId); static bool32 EvoScene_IsMonAnimFinished(u8 monSpriteId); diff --git a/src/faraway_island.c b/src/faraway_island.c index e3d8444c9..bc0814652 100755 --- a/src/faraway_island.c +++ b/src/faraway_island.c @@ -372,7 +372,6 @@ void SetMewAboveGrass(void) { s16 x; s16 y; - u8 spriteId; struct ObjectEvent *mew = &gObjectEvents[GetMewObjectEventId()]; mew->invisible = FALSE; diff --git a/src/fieldmap.c b/src/fieldmap.c index 296c4edf2..2961d2f49 100644 --- a/src/fieldmap.c +++ b/src/fieldmap.c @@ -28,7 +28,7 @@ EWRAM_DATA static u16 gBackupMapData[MAX_MAP_DATA_SIZE] = {0}; EWRAM_DATA struct MapHeader gMapHeader = {0}; EWRAM_DATA struct Camera gCamera = {0}; EWRAM_DATA static struct ConnectionFlags gMapConnectionFlags = {0}; -EWRAM_DATA static u32 sFiller_02037344 = 0; // without this, the next file won't align properly +EWRAM_DATA static u32 sFiller = 0; // without this, the next file won't align properly struct BackupMapLayout gBackupMapLayout; diff --git a/src/fldeff_cut.c b/src/fldeff_cut.c index 0458f7621..446633a53 100644 --- a/src/fldeff_cut.c +++ b/src/fldeff_cut.c @@ -62,7 +62,6 @@ static void HandleLongGrassOnHyper(u8, s16, s16); static u8 sCutSquareSide; static u8 sTileCountFromPlayer_X; static u8 sTileCountFromPlayer_Y; -static u32 sUnused; static bool8 sHyperCutTiles[CUT_HYPER_AREA]; // EWRAM variables diff --git a/src/fldeff_escalator.c b/src/fldeff_escalator.c index 7a96eaa82..733dca722 100644 --- a/src/fldeff_escalator.c +++ b/src/fldeff_escalator.c @@ -10,8 +10,6 @@ static EWRAM_DATA u8 sEscalatorAnim_TaskId = 0; static void SetEscalatorMetatile(u8 taskId, const s16 *metatileIds, u16 metatileMasks); static void Task_DrawEscalator(u8 taskId); -static void Task_DrawTeleporterHousing(u8 taskId); -static void Task_DrawTeleporterCable(u8 taskId); #define ESCALATOR_STAGES 3 #define LAST_ESCALATOR_STAGE (ESCALATOR_STAGES - 1) diff --git a/src/intro.c b/src/intro.c index 7dab2ad46..7c92913b6 100644 --- a/src/intro.c +++ b/src/intro.c @@ -986,8 +986,6 @@ static void SerialCB_CopyrightScreen(void) static u8 SetUpCopyrightScreen(void) { - u16 ime; - switch (gMain.state) { case 0: @@ -1302,7 +1300,6 @@ static void Task_IntroStartBikeRide(u8 taskId) static void Task_IntroHandleBikeAndFlygonMovement(u8 taskId) { - s16 a; u16 offset; if (gIntroFrameCounter == 1856) diff --git a/src/item_menu.c b/src/item_menu.c index 931cba2bf..e7da03724 100755 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -627,7 +627,6 @@ void CB2_Bag(void) bool8 SetupBagMenu(void) { - u32 index; u8 taskId; switch (gMain.state) diff --git a/src/librfu_rfu.c b/src/librfu_rfu.c index fe1d10834..7cb9b1bd6 100644 --- a/src/librfu_rfu.c +++ b/src/librfu_rfu.c @@ -1724,7 +1724,6 @@ static void rfu_constructSendLLFrame(void) u32 pakcketSize, currSize; u8 i; u8 *llf_p; - struct RfuSlotStatusNI *slotStatusNI; if (gRfuLinkStatus->parentChild != MODE_NEUTRAL && gRfuLinkStatus->sendSlotNIFlag | gRfuLinkStatus->recvSlotNIFlag | gRfuLinkStatus->sendSlotUNIFlag) diff --git a/src/match_call.c b/src/match_call.c index 723562ade..7e8d0c38a 100644 --- a/src/match_call.c +++ b/src/match_call.c @@ -1494,7 +1494,6 @@ static const struct MatchCallText *GetGeneralMatchCallText(int matchCallId, u8 * int count; u32 topic, id; u16 rand; - u16 var3; rand = Random(); if (!(rand & 1)) diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c index af68c6116..c97ee94f3 100644 --- a/src/mauville_old_man.c +++ b/src/mauville_old_man.c @@ -1324,7 +1324,6 @@ static void PrintStoryList(void) { s32 i; s32 width = GetStringWidth(1, gText_Exit, 0); - u8 tileWidth; for (i = 0; i < NUM_STORYTELLER_TALES; i++) { s32 curWidth; diff --git a/src/minigame_countdown.c b/src/minigame_countdown.c index cd5710d44..d2f7d3ea8 100644 --- a/src/minigame_countdown.c +++ b/src/minigame_countdown.c @@ -14,7 +14,6 @@ static void sub_802E83C(u8 taskId); static void sub_802E8C8(u8 taskId); static void sub_802EA50(u8 taskId); static void sub_802EAB0(u8 taskId); -static void sub_802EB98(u8 taskId); static void Task_MinigameCountdown(u8 taskId); static bool32 RunMinigameCountdownDigitsAnim(u8 spriteId); static bool32 IsStartGraphicAnimRunning(u8 spriteId); diff --git a/src/overworld.c b/src/overworld.c index 72aa17929..cbfc70898 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -174,7 +174,6 @@ static u8 sPlayerTradingStates[MAX_LINK_PLAYERS]; static u16 (*sPlayerKeyInterceptCallback)(u32); static bool8 sUnknown_03000E18; static u8 sRfuKeepAliveTimer; -static u32 sUnusedVar; // IWRAM common u16 *gBGTilemapBuffers1; diff --git a/src/palette.c b/src/palette.c index 788cb4d64..ece753d21 100644 --- a/src/palette.c +++ b/src/palette.c @@ -60,7 +60,7 @@ ALIGNED(4) EWRAM_DATA u16 gPlttBufferUnfaded[PLTT_BUFFER_SIZE] = {0}; ALIGNED(4) EWRAM_DATA u16 gPlttBufferFaded[PLTT_BUFFER_SIZE] = {0}; EWRAM_DATA struct PaletteStruct sPaletteStructs[0x10] = {0}; EWRAM_DATA struct PaletteFadeControl gPaletteFade = {0}; -static EWRAM_DATA u32 gFiller_2037FE0 = 0; +static EWRAM_DATA u32 sFiller = 0; static EWRAM_DATA u32 sPlttBufferTransferPending = 0; EWRAM_DATA u8 gPaletteDecompressionBuffer[PLTT_DECOMP_BUFFER_SIZE] = {0}; diff --git a/src/party_menu.c b/src/party_menu.c index 8aca27f47..256558985 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -151,7 +151,7 @@ static EWRAM_DATA u16 *sSlot1TilemapBuffer = 0; // for switching party slots static EWRAM_DATA u16 *sSlot2TilemapBuffer = 0; // EWRAM_DATA u8 gSelectedOrderFromParty[MAX_FRONTIER_PARTY_SIZE] = {0}; static EWRAM_DATA u16 sPartyMenuItemId = 0; -static EWRAM_DATA u16 sUnused_0203CEFE = 0; +static EWRAM_DATA u16 sUnused = 0; EWRAM_DATA u8 gBattlePartyCurrentOrder[PARTY_SIZE / 2] = {0}; // bits 0-3 are the current pos of Slot 1, 4-7 are Slot 2, and so on // IWRAM common diff --git a/src/player_pc.c b/src/player_pc.c index 928aac706..866347238 100644 --- a/src/player_pc.c +++ b/src/player_pc.c @@ -1058,7 +1058,6 @@ static void ItemStorage_ProcessWithdrawTossInput(u8 taskId) s16 *data; bool32 toss; u32 i, x; - u8 windowId; const u8* text; data = gTasks[taskId].data; diff --git a/src/pokeblock_feed.c b/src/pokeblock_feed.c index 32db6c717..a930523ce 100644 --- a/src/pokeblock_feed.c +++ b/src/pokeblock_feed.c @@ -61,7 +61,6 @@ static void HandleInitWindows(void); static void LaunchPokeblockFeedTask(void); static void SetPokeblockSpritePal(u8 pokeblockCaseId); static void sub_817A5CC(void); -static void sub_8148108(u8 spriteId, bool8 a1); static void DoPokeblockCaseThrowEffect(u8 spriteId, bool8 arg1); static void PrepareMonToMoveToPokeblock(u8 spriteId); static void Task_HandleMonAtePokeblock(u8 taskId); diff --git a/src/pokedex.c b/src/pokedex.c index 6aa347994..bc06dc796 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -1587,9 +1587,6 @@ static void ResetPokedexView(struct PokedexView *pokedexView) void CB2_OpenPokedex(void) { - u8 *addr; - u32 size; - switch (gMain.state) { case 0: diff --git a/src/pokedex_area_screen.c b/src/pokedex_area_screen.c index 7a3b38dc2..b63b00290 100755 --- a/src/pokedex_area_screen.c +++ b/src/pokedex_area_screen.c @@ -489,7 +489,6 @@ static bool8 MonListHasMon(const struct WildPokemonInfo *info, u16 species, u16 static void BuildAreaGlowTilemap(void) { u16 i, y, x, j; - u16 val; for (i = 0; i < ARRAY_COUNT(sPokedexAreaScreen->areaGlowTilemap); i++) sPokedexAreaScreen->areaGlowTilemap[i] = 0; diff --git a/src/pokemon.c b/src/pokemon.c index 5829bbd0a..2ac7d647c 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -4658,7 +4658,6 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov u32 var_28 = 0; u16 heldItem; u8 r10; - u32 r4; u32 r5; s8 r2; u16 evCount; diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 4be1cf729..50fc04372 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -8389,7 +8389,7 @@ static u8 sub_80D0894(void) static void sub_80D08CC(void) { - s32 i, j, r8, r9; + s32 i, j; s32 rowCount, columnCount; u8 boxId; u8 monArrayId; diff --git a/src/record_mixing.c b/src/record_mixing.c index 898459c0a..2028cc647 100644 --- a/src/record_mixing.c +++ b/src/record_mixing.c @@ -94,7 +94,6 @@ static void *sApprenticesSave; static void *sBattleTowerSave_Duplicate; static u32 sRecordStructSize; static u8 gUnknown_03001160; -static u32 filler_03001164; static struct PlayerHallRecords *gUnknown_03001168[3]; static EWRAM_DATA struct RecordMixingDayCareMail gUnknown_02039F9C = {0}; diff --git a/src/script.c b/src/script.c index 9ba1a7429..e6557aa75 100644 --- a/src/script.c +++ b/src/script.c @@ -11,9 +11,7 @@ extern const u8* gUnknown_020375C0; // ewram bss static u8 sScriptContext1Status; -static u32 sUnusedVariable1; static struct ScriptContext sScriptContext1; -static u32 sUnusedVariable2; static struct ScriptContext sScriptContext2; static bool8 sScriptContext2Enabled; diff --git a/src/shop.c b/src/shop.c index 44ab0885c..a447982fc 100755 --- a/src/shop.c +++ b/src/shop.c @@ -489,7 +489,6 @@ static void BuyMenuFreeMemory(void) static void BuyMenuBuildListMenuTemplate(void) { u16 i; - u16 itemCount; gUnknown_02039F74 = Alloc((gMartInfo.itemCount + 1) * sizeof(*gUnknown_02039F74)); gUnknown_02039F78 = Alloc((gMartInfo.itemCount + 1) * sizeof(*gUnknown_02039F78)); diff --git a/src/starter_choose.c b/src/starter_choose.c index 771db961e..f7ffcfc2c 100644 --- a/src/starter_choose.c +++ b/src/starter_choose.c @@ -378,7 +378,6 @@ static void VblankCB_StarterChoose(void) void CB2_ChooseStarter(void) { - u16 savedIme; u8 taskId; u8 spriteId; diff --git a/src/tv.c b/src/tv.c index 748915c7a..1e112332f 100644 --- a/src/tv.c +++ b/src/tv.c @@ -2085,7 +2085,6 @@ static void sub_80EDE98(TVShow *show) u16 k; u8 n; u8 deco; - u8 x; for (i = 0; i < DECOR_MAX_SECRET_BASE; i ++) { @@ -4095,7 +4094,6 @@ static void sub_80F0E58(PokeNews *dest[16], PokeNews *src[16]) static bool8 sub_80F0E84(PokeNews *dest, PokeNews *src, s8 slot) { u8 i; - u8 kind; if (src->kind == POKENEWS_NONE) { @@ -6602,7 +6600,6 @@ static void DoTVShowSpotTheCuties(void) { TVShow *show; u8 state; - u32 playerId; show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004]; gSpecialVar_Result = FALSE; @@ -6707,7 +6704,6 @@ static void DoTVShowPokemonNewsBattleFrontier(void) { TVShow *show; u8 state; - u32 playerId; show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004]; gSpecialVar_Result = FALSE; @@ -6856,7 +6852,6 @@ static void DoTVShowWhatsNo1InHoennToday(void) { TVShow *show; u8 state; - u32 playerId; show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004]; gSpecialVar_Result = FALSE;