From a2c37739d71d402c75cf118df02d558ea1d849f5 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 16 Apr 2023 14:22:48 +0300 Subject: [PATCH 30/30] Clean out double-semicolons See osdn #47871 Signed-off-by: Marko Lindqvist --- client/agents/sha.c | 6 +++--- client/gui-gtk-3.22/sprite.c | 2 +- client/gui-gtk-4.0/sprite.c | 2 +- client/gui-qt/helpdlg.cpp | 4 ++-- client/gui-qt/repodlgs.cpp | 3 ++- client/helpdata.c | 2 +- client/servers.c | 4 ++-- common/tile.h | 2 +- server/citytools.c | 4 ++-- server/ruleset.c | 2 +- server/savegame/savegame3.c | 4 ++-- server/stdinhand.c | 2 +- server/unithand.c | 4 ++-- 13 files changed, 21 insertions(+), 20 deletions(-) diff --git a/client/agents/sha.c b/client/agents/sha.c index ee43ad6423..e6338fd76d 100644 --- a/client/agents/sha.c +++ b/client/agents/sha.c @@ -87,14 +87,14 @@ static void sha_unit_new(int id) **************************************************************************/ static void sha_unit_remove(int id) { - struct unit *pold_unit = unit_list_find(previous_units, id);; + struct unit *pold_unit = unit_list_find(previous_units, id); log_debug("sha got unit: %d", id); fc_assert_ret(NULL != pold_unit); unit_list_remove(previous_units, pold_unit); - /* list pointers were struct copied, cannot unit_virtual_destroy() */ - memset(pold_unit, 0, sizeof(*pold_unit)); /* ensure no pointers remain */ + /* List pointers were struct copied, cannot unit_virtual_destroy() */ + memset(pold_unit, 0, sizeof(*pold_unit)); /* Ensure no pointers remain */ free(pold_unit); } diff --git a/client/gui-gtk-3.22/sprite.c b/client/gui-gtk-3.22/sprite.c index 2cf4883661..85b6ed99b0 100644 --- a/client/gui-gtk-3.22/sprite.c +++ b/client/gui-gtk-3.22/sprite.c @@ -170,7 +170,7 @@ static void surf_destroy_callback(void *data) struct sprite *load_gfxfile(const char *filename) { struct sprite *spr; - GError *err = NULL;; + GError *err = NULL; GdkPixbuf *pb = gdk_pixbuf_new_from_file(filename, &err); int width; int height; diff --git a/client/gui-gtk-4.0/sprite.c b/client/gui-gtk-4.0/sprite.c index 2beffadbb1..f87472fbae 100644 --- a/client/gui-gtk-4.0/sprite.c +++ b/client/gui-gtk-4.0/sprite.c @@ -170,7 +170,7 @@ static void surf_destroy_callback(void *data) struct sprite *load_gfxfile(const char *filename) { struct sprite *spr; - GError *err = NULL;; + GError *err = NULL; GdkPixbuf *pb = gdk_pixbuf_new_from_file(filename, &err); int width; int height; diff --git a/client/gui-qt/helpdlg.cpp b/client/gui-qt/helpdlg.cpp index 6e4403cc2d..7c1e941e87 100644 --- a/client/gui-qt/helpdlg.cpp +++ b/client/gui-qt/helpdlg.cpp @@ -1345,7 +1345,7 @@ void help_widget::set_topic_terrain(const help_item *topic, fc_snprintf(cult_buffer, sizeof(cult_buffer), PL_("%d turn", "%d turns", pterrain->cultivate_time), pterrain->cultivate_time); - str = N_("Cultiv. Rslt/Time:");; + str = N_("Cultiv. Rslt/Time:"); str = str + link_me(terrain_name_translation(pterrain->cultivate_result), HELP_TERRAIN) + QString(cult_buffer).toHtmlEscaped(); @@ -1367,7 +1367,7 @@ void help_widget::set_topic_terrain(const help_item *topic, fc_snprintf(plant_buffer, sizeof(plant_buffer), PL_("%d turn", "%d turns", pterrain->plant_time), pterrain->plant_time); - str = N_("Plant Rslt/Time:");; + str = N_("Plant Rslt/Time:"); str = str + link_me(terrain_name_translation(pterrain->plant_result), HELP_TERRAIN) + QString(plant_buffer).toHtmlEscaped(); diff --git a/client/gui-qt/repodlgs.cpp b/client/gui-qt/repodlgs.cpp index 4a4fbfbecc..f89bb64179 100644 --- a/client/gui-qt/repodlgs.cpp +++ b/client/gui-qt/repodlgs.cpp @@ -852,8 +852,9 @@ QSize research_diagram::size() { QSize s; - s.setWidth(width);; + s.setWidth(width); s.setHeight(height); + return s; } diff --git a/client/helpdata.c b/client/helpdata.c index 723016883b..ac69603fde 100644 --- a/client/helpdata.c +++ b/client/helpdata.c @@ -4107,7 +4107,7 @@ void helptext_extra(char *buf, size_t bufsz, struct player *pplayer, _("\nYields an output bonus with some terrains:\n\n")); CATLSTR(buf, bufsz, _("Terrain Bonus F/P/T\n" - "-------------------------\n"));; + "-------------------------\n")); } terrain_type_iterate(t) { int turns = road ? terrain_extra_build_time(t, ACTIVITY_GEN_ROAD, pextra) diff --git a/client/servers.c b/client/servers.c index c425a52f8d..2e68287664 100644 --- a/client/servers.c +++ b/client/servers.c @@ -648,9 +648,9 @@ get_lan_server_list(struct server_scan *scan) inet_ntop(AF_INET6, &fromend.saddr_in6.sin6_addr, dst, sizeof(dst)); } else if (fromend.saddr.sa_family == AF_INET) { - inet_ntop(AF_INET, &fromend.saddr_in4.sin_addr, dst, sizeof(dst));; + inet_ntop(AF_INET, &fromend.saddr_in4.sin_addr, dst, sizeof(dst)); } else { - fc_assert(FALSE); + fc_assert(FALSE); log_error("Unsupported address family in get_lan_server_list()"); diff --git a/common/tile.h b/common/tile.h index 2725d76e51..91d4b399b1 100644 --- a/common/tile.h +++ b/common/tile.h @@ -151,7 +151,7 @@ bool tile_has_visible_extra(const struct tile *ptile, const struct extra_type *p bool tile_has_cause_extra(const struct tile *ptile, enum extra_cause cause); void tile_add_extra(struct tile *ptile, const struct extra_type *pextra); void tile_remove_extra(struct tile *ptile, const struct extra_type *pextra); -bool tile_has_extra_flag(const struct tile *ptile, enum extra_flag_id flag);; +bool tile_has_extra_flag(const struct tile *ptile, enum extra_flag_id flag); /* Vision related */ enum known_type tile_get_known(const struct tile *ptile, diff --git a/server/citytools.c b/server/citytools.c index 403c70176f..e064eb73d7 100644 --- a/server/citytools.c +++ b/server/citytools.c @@ -3432,9 +3432,9 @@ bool city_map_update_radius_sq(struct city *pcity) city_tiles_new = city_map_tiles(city_radius_sq_new); if (city_tiles_old == city_tiles_new) { - /* a change of the squared city radius but no change of the number of + /* A change of the squared city radius but no change of the number of * city tiles */ - return FALSE;; + return FALSE; } log_debug("[%s (%d)] city_map_radius_sq: %d => %d", city_name_get(pcity), diff --git a/server/ruleset.c b/server/ruleset.c index d88f0d4521..3459d81bc1 100644 --- a/server/ruleset.c +++ b/server/ruleset.c @@ -8130,7 +8130,7 @@ static void send_ruleset_techs(struct conn_list *dest) packet.research_reqs[i++] = req_from_values(VUT_ADVANCE, REQ_RANGE_PLAYER, FALSE, TRUE, FALSE, - advance_number(a->require[AR_TWO]));; + advance_number(a->require[AR_TWO])); } /* The requirements of the tech's research_reqs also goes in the diff --git a/server/savegame/savegame3.c b/server/savegame/savegame3.c index 0b1856349c..50f3649777 100644 --- a/server/savegame/savegame3.c +++ b/server/savegame/savegame3.c @@ -2657,14 +2657,14 @@ static void sg_load_counters(struct loaddata *loading) } /************************************************************************//** -Save [counters]. + Save [counters]. ****************************************************************************/ static void sg_save_counters(struct savedata *saving) { /* Check status and return if not OK (sg_success FALSE). */ sg_check_ret(); - const char **countnames;; + const char **countnames; int *countvalues; int i, j, count; diff --git a/server/stdinhand.c b/server/stdinhand.c index 1bb860682a..fc724e1b87 100644 --- a/server/stdinhand.c +++ b/server/stdinhand.c @@ -5074,7 +5074,7 @@ static bool lua_command(struct connection *caller, char *arg, bool check, _("Freeciv script '%s' disallowed for security reasons."), luafile); ret = FALSE; - goto cleanup;; + goto cleanup; } sz_strlcpy(tilde_filename, luafile); } else { diff --git a/server/unithand.c b/server/unithand.c index 61855ce93b..3d70ca4c9a 100644 --- a/server/unithand.c +++ b/server/unithand.c @@ -4107,7 +4107,7 @@ static bool do_unit_change_homecity(struct unit *punit, _("%s transferred control over a %s to you in %s."), giver, unit_tile_link(punit), - city_link(pcity));; + city_link(pcity)); } return punit->homecity == pcity->id; @@ -4156,7 +4156,7 @@ static bool city_add_unit(struct player *pplayer, struct unit *punit, _("%s adds %s to your city %s."), player_name(unit_owner(punit)), unit_tile_link(punit), - city_link(pcity));; + city_link(pcity)); } action_consequence_success(paction, pplayer, act_utype, -- 2.39.2