Skip to content

Fix -Werror unused-parameter build break in AuctionHouseBot#12

Merged
icemansparks merged 2 commits into
merkerhoodfrom
fix/ahbot-unused-params
Jul 1, 2026
Merged

Fix -Werror unused-parameter build break in AuctionHouseBot#12
icemansparks merged 2 commits into
merkerhoodfrom
fix/ahbot-unused-params

Conversation

@icemansparks

Copy link
Copy Markdown
Collaborator

Problem

The core build fails (-Werror -Wunused-parameter, clang-18):

src/AuctionHouseBot.cpp:87:86: fatal error: unused parameter 'botId' [-Wunused-parameter]

This is pre-existing (the flagged code dates to 2025-05-21) and became fatal with the stricter flags from the recent azerothcore master merge. -ferror-limit=1 only surfaces the first one; a scan of the module found a second identical case.

Fix

Two named-but-unused parameters, unnamed following the module's own existing convention (see AuctionHouseBotAuctionHouseScript.cpp, which already unnames unused hook params):

  • AuctionHouseBot::getElementuint32 botId (dedup keys on the botItemCounts map, not botId)
  • AuctionHouseBot::GetItemsToSellObjectGuid botGuid (body uses the _id member instead)

No behavior change; both parameters were already dead code.

The core build uses -Werror -Wunused-parameter. getElement's botId and
GetItemsToSell's botGuid are never used in their bodies (dedup keys on the
botItemCounts map / _id member instead), producing a fatal build error.
Unname both parameters following the module's existing convention.
-Wunused-variable is fatal under the core build. Remove dead locals in
Buy() (guid) and Sell() (minAuctionsPerBot, maxStackSize, and the now-orphaned
minTotalItems). All were assigned side-effect-free getters/arithmetic and
never read.
@icemansparks
icemansparks merged commit f97a218 into merkerhood Jul 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant