From: Rick Bird Date: Mon, 18 Apr 2011 22:50:29 +0000 (-0400) Subject: IssueID #238 (ISO C Compiler Issues) X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=5a457b46ecf4906970cda7f0e8e7068fc30d5b23;p=cobramush.git IssueID #238 (ISO C Compiler Issues) Added { } around MODULE_ITER's since a couple lines were added to the MODULE_x macros called within. --- diff --git a/src/bsd.c b/src/bsd.c index 59ea2d3..7cebfea 100644 --- a/src/bsd.c +++ b/src/bsd.c @@ -743,8 +743,10 @@ main(int argc, char **argv) dump_database(); /* Replacement for local_shutdown */ - MODULE_ITER(m) + MODULE_ITER(m) { MODULE_FUNC_NOARGS(handle, m->handle, "module_shutdown"); + } + #ifdef RPMODE_SYS rplog_shutdown(); @@ -2743,8 +2745,9 @@ dump_messages(DESC *d, dbref player, int isnew) if (Haven(player)) notify(player, T("Your HAVEN flag is set. You cannot receive pages.")); /* Replacement for local_connect */ - MODULE_ITER(m) + MODULE_ITER(m) { MODULE_FUNC(handle, m->handle, "module_connect", player, isnew, num); + } return 1; } @@ -3789,8 +3792,9 @@ announce_disconnect(dbref player) set_flag_internal(player, "GOING_TWICE"); } /* Replacement for local_disconnect */ - MODULE_ITER(m) + MODULE_ITER(m) { MODULE_FUNC(handle, m->handle, "module_disconnect", player, num); + } } @@ -5611,8 +5615,9 @@ do_reboot(dbref player, int flag) kill_info_slave(); #endif /* Replacement for local_shutdown */ - MODULE_ITER(m) + MODULE_ITER(m) { MODULE_FUNC_NOARGS(handle, m->handle, "module_shutdown"); + } end_all_logs(); #ifndef WIN32 { diff --git a/src/create.c b/src/create.c index e212e40..7f347bd 100644 --- a/src/create.c +++ b/src/create.c @@ -164,8 +164,9 @@ do_real_open(dbref player, const char *direction, const char *linkto, } current_state.exits++; /* Replacement for local_data_create */ - MODULE_ITER(m) + MODULE_ITER(m) { MODULE_FUNC(handle, m->handle, "module_data_create", new_exit); + } return new_exit; } @@ -434,8 +435,9 @@ do_dig(dbref player, const char *name, char **argv, int tport) current_state.rooms++; /* Replacement for local_data_create */ - MODULE_ITER(m) + MODULE_ITER(m) { MODULE_FUNC(handle, m->handle, "module_data_create", room); + } if (tport) { /* We need to use the full command, because we need NO_TEL @@ -512,8 +514,9 @@ do_create(dbref player, char *name, int cost) notify_format(player, T("Created: Object %s."), unparse_dbref(thing)); current_state.things++; /* Replacement for local_data_create */ - MODULE_ITER(m) + MODULE_ITER(m) { MODULE_FUNC(handle, m->handle, "module_data_create", thing); + } return thing; } @@ -622,8 +625,9 @@ do_clone(dbref player, char *name, char *newname, int preserve) moveto(clone, Location(player)); current_state.things++; /* Replacement for local_data_clone */ - MODULE_ITER(m) + MODULE_ITER(m) { MODULE_FUNC(handle, m->handle, "module_data_clone", clone,thing); + } real_did_it(player, clone, NULL, NULL, NULL, NULL, "ACLONE", NOTHING, global_eval_context.wenv, 0); @@ -638,8 +642,9 @@ do_clone(dbref player, char *name, char *newname, int preserve) notify_format(player, T("Cloned: Room #%d."), clone); current_state.rooms++; /* local_data_clone replacement */ - MODULE_ITER(m) + MODULE_ITER(m) { MODULE_FUNC(handle, m->handle, "module_data_clone", clone,thing); + } real_did_it(player, clone, NULL, NULL, NULL, NULL, "ACLONE", NOTHING, global_eval_context.wenv, 0); return clone; @@ -692,8 +697,9 @@ do_clone(dbref player, char *name, char *newname, int preserve) notify(player, T("Warning: @CLONE/PRESERVE on an exit with powers or warnings.")); notify_format(player, T("Cloned: Exit #%d."), clone); /* Replacement for local_data_clone */ - MODULE_ITER(m) + MODULE_ITER(m) { MODULE_FUNC(handle, m->handle, "module_data_clone", clone,thing); + } return clone; } } @@ -855,8 +861,9 @@ dbref copy_room(dbref room, dbref newowner) { current_state.rooms++; /* Replacement for local_data_create */ - MODULE_ITER(m) + MODULE_ITER(m) { MODULE_FUNC(handle, m->handle, "module_data_create", room); + } return new_room; } diff --git a/src/db.c b/src/db.c index 75d6118..360a5f5 100644 --- a/src/db.c +++ b/src/db.c @@ -2296,8 +2296,9 @@ create_minimal_db(void) add_player(god); s_Pennies(god, START_BONUS); - MODULE_ITER(m) + MODULE_ITER(m) { MODULE_FUNC(handle, m->handle, "module_data_create", god); + } current_state.players++; diff --git a/src/destroy.c b/src/destroy.c index 179fa22..7eb5400 100644 --- a/src/destroy.c +++ b/src/destroy.c @@ -616,8 +616,9 @@ free_object(dbref thing) return; /* Replacement for data_free */ - MODULE_ITER(m) + MODULE_ITER(m) { MODULE_FUNC(handle, m->handle, "module_data_free", thing); + } switch (Typeof(thing)) { case TYPE_DIVISION: @@ -1038,8 +1039,9 @@ dbck(void) validate_config(); /* Replacement for local_dbck */ - MODULE_ITER(m) + MODULE_ITER(m) { MODULE_FUNC_NOARGS(handle, m->handle, "module_dbck"); + } } /* Do division integrity checks */ diff --git a/src/game.c b/src/game.c index 6500d60..55015db 100644 --- a/src/game.c +++ b/src/game.c @@ -351,8 +351,9 @@ dump_database_internal(void) return false; } else { /* Replacement local_dump_database */ - MODULE_ITER(m) + MODULE_ITER(m) { MODULE_FUNC_NOARGS(handle, m->handle, "module_dump_database"); + } #ifdef ALWAYS_PARANOID paranoid_checkpt = db_top / 5; @@ -803,8 +804,9 @@ init_game_config(const char *conf) /* Load all the config file stuff except restrict_* */ /* local_configs() replacement */ - MODULE_ITER(m) + MODULE_ITER(m) { MODULE_FUNC_NOARGS(handler, m->handle, "module_configs"); + } conf_default_set(); config_file_startup(conf, 0); @@ -857,8 +859,9 @@ init_game_postdb(const char *conf) #endif /* CRON */ /* Call Local Startup */ /* local_startup() replacement */ - MODULE_ITER(m) + MODULE_ITER(m) { MODULE_FUNC_NOARGS(handle, m->handle, "module_startup"); + } /* everything else ok. Restart all objects. */ diff --git a/src/player.c b/src/player.c index 02d07e2..e263919 100644 --- a/src/player.c +++ b/src/player.c @@ -468,8 +468,9 @@ make_player(const char *name, const char *password, const char *host, current_state.players++; /* Replacement for local_data_create */ - MODULE_ITER(m) + MODULE_ITER(m) { MODULE_FUNC(handle, m->handle, "module_data_create", player); + } return player; diff --git a/src/timer.c b/src/timer.c index 21a163a..ae290c8 100644 --- a/src/timer.c +++ b/src/timer.c @@ -299,8 +299,9 @@ dispatch(void) #endif /* Replacement for local_timer */ - MODULE_ITER(m) + MODULE_ITER(m) { MODULE_FUNC_NOARGS(handle, m->handle, "module_timer"); + } } sig_atomic_t cpu_time_limit_hit = 0; /** Was the cpu time limit hit? */