Fix all the compile warnings that occur on Mac.

(Except the OpenGL deprecation warning and some warnings coming from Boost.Process.)
This commit is contained in:
2025-03-08 20:43:04 -05:00
parent 67fbb4fae5
commit 5cfc6ba328
17 changed files with 41 additions and 27 deletions

View File

@@ -1311,6 +1311,7 @@ static void handle_party_death() {
}
void screen_shift(int dx, int dy, bool& need_redraw) {
(void) need_redraw; // Mark the variable unused
if(abs(dx) + abs(dy) == 0)
return;
@@ -2162,8 +2163,6 @@ void debug_magic_map() {
print_buf();
}
extern void outd_move_to_first_town_entrance(int town);
void debug_enter_town() {
if(recording){
record_action("debug_enter_town", "");
@@ -2384,7 +2383,7 @@ std::map<char,key_action_t> debug_actions;
std::map<char,key_action_t> startup_debug_actions;
std::vector<std::vector<char>> debug_actions_help_order;
void add_debug_action(std::vector<char> keys, std::string name, void (*action)(), bool startup_safe = false) {
static void add_debug_action(std::vector<char> keys, std::string name, void (*action)(), bool startup_safe = false) {
key_action_t shortcut = {keys, name, action};
for(char ch: keys){
debug_actions[ch] = shortcut;
@@ -2523,7 +2522,7 @@ void init_debug_actions() {
}
// Later we might want to know whether the key is used or not
bool handle_debug_key(char key) {
static bool handle_debug_key(char key) {
if(!univ.debug_mode && key != 'D')
return false;
if(overall_mode == MODE_STARTUP){
@@ -4100,4 +4099,4 @@ void clear_trapped_monst() {
univ.party.imprisoned_monst.fill(0);
ASB("Debug: Captures souls cleared.");
print_buf();
}
}

View File

@@ -39,6 +39,7 @@ void handle_death();
void start_new_game(bool force = false);
void start_tutorial();
location get_cur_direction(location the_point);
void outd_move_to_first_town_entrance(int town);
bool outd_move_party(location destination,bool forced);
bool town_move_party(location destination,short forced);
bool someone_poisoned();

View File

@@ -107,7 +107,7 @@ short store_cur_pc = -1;
// For healing shops, other PCs might be able to buy something if
// the active PC can't
bool start_shop_mode_other_pc(bool allow_empty = false) {
static bool start_shop_mode_other_pc(bool allow_empty = false) {
// The shop might change the current PC multiple times, but we want to restore
// it to the original active PC when shopping ends, so only store if we're
// not yet storing
@@ -129,6 +129,7 @@ bool start_shop_mode_other_pc(bool allow_empty = false) {
}
}
if(!other_pc_can_buy && allow_empty){
univ.cur_pc = pc_buying;
start_shop_mode(active_shop_num,active_shop.getCostAdjust(),save_talk_str1,false,true);
}
return other_pc_can_buy;