Skip to content

Commit

Permalink
fix a few warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
pionere committed Aug 12, 2024
1 parent 587d073 commit ee7987a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Source/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2528,7 +2528,7 @@ void DrawCampaignMap()
sx += CAMICON_WIDTH * (CAM_RADIUS - lengthof(camEntries) / 2);
sy += CAMICON_HEIGHT * (CAM_RADIUS - lengthof(camEntries[0]) / 2);

currCamEntry = { 0 };
currCamEntry = { 0, 0, 0, FALSE };
for (int cy = 0; cy < lengthof(camEntries[0]); cy++) {
for (int cx = 0; cx < lengthof(camEntries); cx++) {
const CampaignMapEntry &cme = camEntries[cy][cx];
Expand Down
6 changes: 3 additions & 3 deletions Source/gamemenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ DEVILUTION_BEGIN_NAMESPACE
static void gamemenu_previous(bool bActivate);
static void gamemenu_new_game(bool bActivate);
static void gamemenu_exit_game(bool bActivate);
static void gamemenu_load_game(bool bActivate);
//static void gamemenu_load_game(bool bActivate);
static void gamemenu_save_game(bool bActivate);
static void gamemenu_restart_town(bool bActivate);
//void gamemenu_settings(bool bActivate);
Expand Down Expand Up @@ -113,7 +113,7 @@ static void gamemenu_exit_game(bool bActivate)
gbRunGameResult = false;
}

static void gamemenu_load_game(bool bActivate)
/*static void gamemenu_load_game(bool bActivate)
{
WNDPROC saveProc = SetWindowProc(DisableInputWndProc);
gamemenu_off();
Expand All @@ -134,7 +134,7 @@ static void gamemenu_load_game(bool bActivate)
PaletteFadeIn(false);
interface_msg_pump();
SetWindowProc(saveProc);
}
}*/

static void gamemenu_save_game(bool bActivate)
{
Expand Down
6 changes: 4 additions & 2 deletions Source/path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ static unsigned gnLastNodeIdx;
static int8_t reversePathDirs[MAX_PATH_LENGTH];
/** A linked list of all visited nodes. */
static PATHNODE* pathVisitedNodes;
#ifdef DEBUG_PATH
/** A stack for recursively update nodes. */
static PATHNODE* pathUpdateStack[MAXPATHNODES];
#endif
/** A linked list of the A* frontier, sorted by distance. */
static PATHNODE* pathFrontNodes;
/** The target location. */
Expand Down Expand Up @@ -92,7 +94,7 @@ static void PathAddNode(PATHNODE* pPath)
pPath->NextNode = next;
current->NextNode = pPath;
}

#ifdef DEBUG_PATH
/**
* @brief return 2 if (sx,sy) is horizontally/vertically aligned with (dx,dy), else 3
*
Expand All @@ -104,7 +106,7 @@ static inline int PathStepCost(int sx, int sy, int dx, int dy)
{
return (sx == dx || sy == dy) ? 2 : 3;
}
#ifdef DEBUG_PATH

/**
* @brief update all path costs using depth-first search starting at pPath
*/
Expand Down
1 change: 0 additions & 1 deletion Source/stores.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,6 @@ static void S_ScrollSPBuy()
if (premiumitems[idx]._itype != ITYPE_NONE)
boughtitems--;

unsigned sidx = idx;
for (l = 0; l < STORE_PAGE_ITEMS && idx < SMITH_PREMIUM_ITEMS; ) {
is = &premiumitems[idx];
if (is->_itype != ITYPE_NONE) {
Expand Down

0 comments on commit ee7987a

Please sign in to comment.