? stats ? out ? diff ? auto.rc Index: ai/advmilitary.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/ai/advmilitary.c,v retrieving revision 1.93 diff -u -r1.93 advmilitary.c --- ai/advmilitary.c 2002/03/01 14:07:28 1.93 +++ ai/advmilitary.c 2002/03/01 20:16:08 @@ -52,7 +52,9 @@ int v, def, l; const bool igwall = FALSE; /* this can be an arg if needed, but seems unneeded */ def = 0; - for (l = 0; l * l < pcity->ai.wallvalue * 10; l++) ; + for (l = 0; l * l < pcity->ai.wallvalue * 10; l++) { + /* nothing */ + } /* wallvalue = 10, l = 10, wallvalue = 40, l = 20, wallvalue = 90, l = 30 */ unit_list_iterate(map_get_tile(pcity->x, pcity->y)->units, punit) v = get_defense_power(punit) * punit->hp * Index: ai/aicity.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/ai/aicity.c,v retrieving revision 1.101 diff -u -r1.101 aicity.c --- ai/aicity.c 2002/02/19 20:03:01 1.101 +++ ai/aicity.c 2002/03/01 20:16:08 @@ -420,13 +420,16 @@ if (bestchoice.want > 100 || /* either need defense or building NOW */ pplayer->research.researching == A_NONE) { /* nothing else to do */ buycost = city_buy_cost(pcity); - if (!pcity->shield_stock) ; - else if (!bestchoice.type && is_wonder(bestchoice.choice) && - buycost >= 200) ; /* wait for more vans */ - else if (bestchoice.type && unit_type_flag(bestchoice.choice, F_CITIES) && + if (!pcity->shield_stock) { + /* nothing */ + } else if (!bestchoice.type && is_wonder(bestchoice.choice) && + buycost >= 200) { + /* wait for more vans */ + } else if (bestchoice.type && unit_type_flag(bestchoice.choice, F_CITIES) && !city_got_effect(pcity, B_GRANARY) && (pcity->size < 2 || - pcity->food_stock < city_granary_size(pcity->size-1))) ; - else if (bestchoice.type && bestchoice.type < 3 && /* not a defender */ + pcity->food_stock < city_granary_size(pcity->size-1))) { + /* nothing */ + } else if (bestchoice.type && bestchoice.type < 3 && /* not a defender */ buycost > unit_types[bestchoice.choice].build_cost * 2) { /* too expensive */ if (unit_type_flag(bestchoice.choice, F_CARAVAN) && pplayer->ai.maxbuycost < 100) pplayer->ai.maxbuycost = 100; Index: common/capability.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/capability.c,v retrieving revision 1.8 diff -u -r1.8 capability.c --- common/capability.c 2002/02/16 17:05:05 1.8 +++ common/capability.c 2002/03/01 20:16:18 @@ -26,8 +26,9 @@ start++; \ } \ /* skip to end of token */ \ - for (end = start; *end != '\0' && !isspace(*end) && *end != ','; end++) \ - ; \ + for (end = start; *end != '\0' && !isspace(*end) && *end != ','; end++) { \ + /* nothing */ \ + } \ } /* This routine returns true if the capability in cap appears Index: common/packets.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/packets.c,v retrieving revision 1.192 diff -u -r1.192 packets.c --- common/packets.c 2002/02/26 20:19:10 1.192 +++ common/packets.c 2002/03/01 20:16:24 @@ -1170,7 +1170,9 @@ } /* avoid using strlen (or strcpy) on an (unsigned char*) --dwp */ - for (c = piter->ptr; *c != '\0' && (c - piter->base) < piter->len; c++); + for (c = piter->ptr; *c != '\0' && (c - piter->base) < piter->len; c++) { + /* nothing */ + } if ((c-piter->base) >= piter->len) { ps_len = pack_iter_remaining(piter); @@ -3273,7 +3275,10 @@ cptr=put_uint16(cptr, packet->build_cost); cptr=put_uint8(cptr, packet->upkeep); cptr=put_uint8(cptr, packet->sabotage); - for (count = 0, eff = packet->effect; eff->type != EFT_LAST; count++, eff++) ; + for (count = 0, eff = packet->effect; eff->type != EFT_LAST; + count++, eff++) { + /* nothing */ + } cptr=put_uint8(cptr, count); for (eff = packet->effect; eff->type != EFT_LAST; eff++) { cptr=put_uint8(cptr, eff->type); Index: common/registry.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/registry.c,v retrieving revision 1.46 diff -u -r1.46 registry.c --- common/registry.c 2002/02/24 13:00:46 1.46 +++ common/registry.c 2002/03/01 20:16:25 @@ -608,7 +608,9 @@ c = first = pentry->name; if(*c == '\0' || !isalpha(*c)) break; - for( ; *c != '\0' && isalpha(*c); c++); + for (; *c != '\0' && isalpha(*c); c++) { + /* nothing */ + } if(strncmp(c,"0.",2) != 0) break; c+=2; if(*c == '\0' || !isalnum(*c)) break; Index: common/shared.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/shared.c,v retrieving revision 1.78 diff -u -r1.78 shared.c --- common/shared.c 2002/02/24 11:50:36 1.78 +++ common/shared.c 2002/03/01 20:16:25 @@ -283,7 +283,9 @@ } /* must be composed entirely of printable ISO 8859-1 characters */ - for (cp = name; is_iso_latin1(*cp); cp++) ; + for (cp = name; is_iso_latin1(*cp); cp++) { + /* nothing */ + } if (*cp != '\0') { return NULL; } @@ -791,8 +793,10 @@ grouping = &m; } else { size_t len; - for (len = 0; lc->grouping[len] != '\0' && lc->grouping[len] != CHAR_MAX; len++) - ; + for (len = 0; + lc->grouping[len] != '\0' && lc->grouping[len] != CHAR_MAX; len++) { + /* nothing */ + } len++; grouping = fc_malloc(len); memcpy(grouping, lc->grouping, len); Index: common/worklist.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/worklist.c,v retrieving revision 1.12 diff -u -r1.12 worklist.c --- common/worklist.c 2002/02/27 11:46:19 1.12 +++ common/worklist.c 2002/03/01 20:16:25 @@ -46,7 +46,10 @@ int len = 0; if (pwl) { - for (len = 0; len < MAX_LEN_WORKLIST && pwl->wlefs[len] != WEF_END; len++) ; + for (len = 0; len < MAX_LEN_WORKLIST && pwl->wlefs[len] != WEF_END; + len++) { + /* nothing */ + } } return len; Index: server/ruleset.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/ruleset.c,v retrieving revision 1.98 diff -u -r1.98 ruleset.c --- server/ruleset.c 2002/02/27 11:12:52 1.98 +++ server/ruleset.c 2002/03/01 20:16:35 @@ -1024,11 +1024,10 @@ b->sabotage = secfile_lookup_int(file, "%s.sabotage", sec[i]); for (count = 0; - secfile_lookup_str_default(file, - NULL, - "%s.effect%d.type", - sec[i], count); - count++) ; + secfile_lookup_str_default(file, NULL, "%s.effect%d.type", sec[i], + count); count++) { + /* nothing */ + } if (count>MAX_EFFECTS) { freelog(LOG_FATAL, "For %s maximum number of effects (%d) exceeded", Index: server/srv_main.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/srv_main.c,v retrieving revision 1.69 diff -u -r1.69 srv_main.c --- server/srv_main.c 2002/02/27 11:12:54 1.69 +++ server/srv_main.c 2002/03/01 20:16:39 @@ -592,7 +592,9 @@ int get_next_id_number(void) { - while(is_id_allocated(++global_id_counter) || global_id_counter == 0) ; + while (is_id_allocated(++global_id_counter) || global_id_counter == 0) { + /* nothing */ + } return global_id_counter; } @@ -1695,7 +1697,9 @@ save_counter++; freelog(LOG_DEBUG, "sniffingpackets"); - while(sniff_packets()==1); + while (sniff_packets() == 1) { + /* nothing */ + } /* After sniff, re-zero the timer: (read-out above on next loop) */ clear_timer_start(eot_timer); Index: server/stdinhand.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/stdinhand.c,v retrieving revision 1.211 diff -u -r1.211 stdinhand.c --- server/stdinhand.c 2002/02/27 11:12:54 1.211 +++ server/stdinhand.c 2002/03/01 20:16:42 @@ -2137,7 +2137,9 @@ struct connection *ptarget; /* find the start of the level: */ - for(cptr_s=str; *cptr_s != '\0' && !isalnum(*cptr_s); cptr_s++); + for (cptr_s = str; *cptr_s != '\0' && !isalnum(*cptr_s); cptr_s++) { + /* nothing */ + } /* copy the level into arg_level[] */ for(cptr_d=arg_level; *cptr_s != '\0' && isalnum(*cptr_s); cptr_s++, cptr_d++) { @@ -2180,7 +2182,9 @@ } /* find the start of the name: */ - for(; *cptr_s != '\0' && !isalnum(*cptr_s); cptr_s++); + for (; *cptr_s != '\0' && !isalnum(*cptr_s); cptr_s++) { + /* nothing */ + } /* copy the name into arg_name[] */ for(cptr_d=arg_name; @@ -2406,7 +2410,9 @@ char command[MAX_LEN_CONSOLE_LINE], *cptr_s, *cptr_d; int cmd; - for (cptr_s = str; *cptr_s != '\0' && !isalnum(*cptr_s); cptr_s++); + for (cptr_s = str; *cptr_s != '\0' && !isalnum(*cptr_s); cptr_s++) { + /* nothing */ + } for (cptr_d = command; *cptr_s != '\0' && isalnum(*cptr_s); cptr_s++, cptr_d++) *cptr_d=*cptr_s; *cptr_d='\0'; @@ -2556,7 +2562,9 @@ int cmd,i,len1; int clen = 0; - for (cptr_s = str; *cptr_s != '\0' && !isalnum(*cptr_s); cptr_s++); + for (cptr_s = str; *cptr_s != '\0' && !isalnum(*cptr_s); cptr_s++) { + /* nothing */ + } for (cptr_d = command; *cptr_s != '\0' && isalnum(*cptr_s); cptr_s++, cptr_d++) *cptr_d=*cptr_s; *cptr_d='\0'; @@ -2673,7 +2681,10 @@ int val, cmd; struct settings_s *op; - for (cptr_s = str; *cptr_s != '\0' && !is_ok_opt_name_char(*cptr_s); cptr_s++); + for (cptr_s = str; *cptr_s != '\0' && !is_ok_opt_name_char(*cptr_s); + cptr_s++) { + /* nothing */ + } for(cptr_d=command; *cptr_s != '\0' && is_ok_opt_name_char(*cptr_s); @@ -2682,7 +2693,9 @@ } *cptr_d='\0'; - for (; *cptr_s != '\0' && is_ok_opt_name_value_sep_char(*cptr_s); cptr_s++); + for (; *cptr_s != '\0' && is_ok_opt_name_value_sep_char(*cptr_s); cptr_s++) { + /* nothing */ + } for (cptr_d = arg; *cptr_s != '\0' && is_ok_opt_value_char(*cptr_s); cptr_s++, cptr_d++) *cptr_d=*cptr_s; @@ -2819,7 +2832,9 @@ /* Is it a comment or a blank line? */ /* line is comment if the first non-whitespace character is '#': */ - for (cptr_s = str; *cptr_s != '\0' && isspace(*cptr_s); cptr_s++); + for (cptr_s = str; *cptr_s != '\0' && isspace(*cptr_s); cptr_s++) { + /* nothing */ + } if(*cptr_s == 0 || *cptr_s == '#') { return; } @@ -2828,7 +2843,9 @@ given on the server command line - rp */ if (*cptr_s == SERVER_COMMAND_PREFIX) cptr_s++; - for (; *cptr_s != '\0' && !isalnum(*cptr_s); cptr_s++); + for (; *cptr_s != '\0' && !isalnum(*cptr_s); cptr_s++) { + /* nothing */ + } /* * cptr_s points now to the beginning of the real command. It has @@ -2859,7 +2876,9 @@ return; } - for(; *cptr_s && isspace(*cptr_s); cptr_s++); + for (; *cptr_s && isspace(*cptr_s); cptr_s++) { + /* nothing */ + } sz_strlcpy(arg, cptr_s); cut_comment(arg);