* Compiler warning when RPMODE_SYS enabled [AEJ]
* Recently introduced bug in channel connect/disconnect broadcasts [AEJ]
* @prog could not use attribute trees from parent objects [AEJ]
+ * Numerous compiler warnings [AEJ]
int nptrs = 0, i;
ap = (ATTR *) ptab_firstentry(&ptab_attrib);
+ ptrs[0] = "";
while (ap) {
ptrs[nptrs++] = AL_NAME(ap);
ap = (ATTR *) ptab_nextentry(&ptab_attrib);
switch (*message) {
case SEMI_POSE_TOKEN:
gap = "";
+ /* fall through */
case POSE_TOKEN:
key = 1;
break;
break;
}
#endif /* CHAT_SYSTEM */
+ /* fall through */
case NUMBER_TOKEN:
/* parse_force() destructively modifies the command to replace
* the first space with a '=' if the command is an actual
char *bp;
int nptrs = 0, i;
command = (COMMAND_INFO *) ptab_firstentry(&ptab_command);
+ ptrs[0] = "";
while (command) {
ptrs[nptrs] = command->name;
nptrs++;
case '\"':
case '\\':
OUTPUT(putc('\\', f));
+ /* fall through */
default:
OUTPUT(putc(lbytes[i], f));
}
break;
case TYPE_DIVISION:
do_log(LT_WIZ, player, thing, "Division object scheduled for destruction.");
+ /* fall through */
case TYPE_THING:
if (!Owns(player, thing)) {
notify_format(player, T("%s's %s is scheduled to be destroyed."),
switch (ycode) {
case YES:
GIVE_DPBIT(player, power->flag_yes);
+ /* fall through */
case YESLTE:
GIVE_DPBIT(player, power->flag_lte);
+ /* fall through */
case YESLT:
GIVE_DPBIT(player, power->flag_lt);
break;
switch (ycode) {
case YES:
GIVE_DPBIT(player, power->flag_yes);
+ /* fall through */
case YESLTE:
GIVE_DPBIT(player, power->flag_lte);
+ /* fall through */
case YESLT:
GIVE_DPBIT(player, power->flag_lt);
break;
}
Parent(obj) = SDIV(owner).object;
current_state.divisions++;
- strncpy(buf, object_header(owner, obj), BUFFER_LEN);
+ strncpy(buf, object_header(owner, obj), BUFFER_LEN - 1);
notify_format(owner, T("Division created: %s Parent division: %s"),
buf, object_header(owner, SDIV(obj).object));
return obj;
switch (flag) {
case YES:
GIVE_DPBIT(target, power->flag_yes);
+ /* fall through */
case YESLTE:
GIVE_DPBIT(target, power->flag_lte);
+ /* fall through */
case YESLT:
GIVE_DPBIT(target, power->flag_lt);
break;
switch (plev) {
case YESLTE:
GIVE_DPBIT(obj, power->flag_lte);
+ /* fall through */
case YESLT:
GIVE_DPBIT(obj, power->flag_lt);
break;
switch (plevel) {
case 3:
DPBIT_SET(powc, power->flag_yes);
+ /* fall through */
case 2:
DPBIT_SET(powc, power->flag_lte);
+ /* fall through */
case 1:
DPBIT_SET(powc, power->flag_lt);
break;
list_partial_matches(player, name, PMATCH_ON);
return 1;
}
+ /* fall through */
case CMATCH_EXACT:
+ /* fall through */
case CMATCH_PARTIAL:
do_chat(player, c, msg);
return 1;
/* If we have three or more arguments, the third one is the base case */
if (nargs >= 3) {
- strncpy(base, args[2], BUFFER_LEN);
+ strncpy(base, args[2], BUFFER_LEN - 1);
} else {
- strncpy(base, split_token(&cp, sep), BUFFER_LEN);
+ strncpy(base, split_token(&cp, sep), BUFFER_LEN - 1);
}
wenv[0] = base;
wenv[1] = split_token(&cp, sep);
}
temp = parse_integer(ptr[n]);
- if (EQ(temp, 0)) {
+ if (EQ(temp, 0.0)) {
safe_str(T("#-1 DIVISION BY ZERO"), buff, bp);
return;
}
safe_str(T(e_match), buff, bp);
return;
}
+ /* fall through */
safe_str(poss[get_gender(thing)], buff, bp);
}
case '"':
if (CHAT_STRIP_QUOTE)
string++;
+ /* fall through */
default:
say = 1;
break;
char outbuf[BUFFER_LEN];
char *bp;
int place;
- char placestr[10];
+ char placestr[12];
int j;
char delim = ' ';
if (!command || !*command) {
while (objstring) {
curr = split_token(&objstring, delim);
place++;
- sprintf(placestr, "%d", place);
+ snprintf(placestr, 11, "%d", place);
if (!(flags & DOL_MAP)) {
/* @dolist, queue command */
bind_and_queue(player, cause, command, curr, placestr);
char newfilename[256] = "\0";
/* Must use a buffer for MacOS file path conversion */
- strncpy(newfilename, filename, 256);
+ strncpy(newfilename, filename, 256 - 1);
if (help_init == 0)
init_help_files();
sprintf(buf, "%s , ", port);
getnameinfo(faddr, flen, NULL, 0, port, sizeof(port),
NI_NUMERICHOST | NI_NUMERICSERV);
- strncat(buf, port, sizeof(buf));
+ strncat(buf, port, sizeof(buf) - 1);
strncat(buf, "\r\n", sizeof(buf) - 1);
if (timeout) {
} else {
/* Must use a buffer for MacOS file path conversion */
- strncpy(newfilename, filename, 256);
+ strncpy(newfilename, filename, 255);
*fp = fopen(newfilename, "a");
if (*fp == NULL) {
return messages[type].message;
case NA_NPASCII:
strip = 1;
+ /* fall through */
case NA_PASCII:
+ /* fall through */
case NA_TPASCII:
/* PLAYER Ascii. Different output. \n is \r\n */
if (type == NA_NPASCII)
if (*str)
(*str)++;
if (is_strict_integer(subspace))
- p = abs(parse_integer(subspace));
+ p = labs(parse_integer(subspace));
else
named_substring = subspace;
} else {
case OP_EXACT: /* Fall through */
tcode += 2;
+ /* fall through */
case OP_CHAR:
+ /* fall through */
case OP_CHARNC:
+ /* fall through */
case OP_PLUS:
+ /* fall through */
case OP_MINPLUS:
set_bit(start_bits, tcode[1], caseless, cd);
try_next = FALSE;
/* \0 always starts an octal number, but we may drop through to here with a
larger first octal digit. */
+ /* fall through */
case '0':
c -= '0';
while (i++ < 2 && ptr[1] >= '0' && ptr[1] <= '7')
case OP_EXACT: /* Fall through */
scode += 2;
+ /* fall through */
case OP_CHAR:
+ /* fall through */
case OP_CHARNC:
+ /* fall through */
case OP_PLUS:
+ /* fall through */
case OP_MINPLUS:
if (!inassert)
return -1;
case 'R':
ptr++;
+ /* fall through */
case '0':
+ /* fall through */
case '1':
+ /* fall through */
case '2':
+ /* fall through */
case '3':
+ /* fall through */
case '4':
+ /* fall through */
case '5':
+ /* fall through */
case '6':
+ /* fall through */
case '7':
+ /* fall through */
case '8':
+ /* fall through */
case '9':
ptr += 2;
if (c != 'R')
}
/* For DOTALL case, fall through and treat as \C */
+ /* fall through */
case OP_ANYBYTE:
c = max - min;
if (c > md->end_subject - eptr)
switch (*arg2) {
case SEMI_POSE_TOKEN:
gap = "";
+ /* fall through */
case POSE_TOKEN:
key = 1;
arg2++;
break;
case SEMI_POSE_TOKEN:
gap = "";
+ /* fall through */
case POSE_TOKEN:
pose = 1;
message++;
switch (*message) {
case SEMI_POSE_TOKEN:
gap = "";
+ /* fall through */
case POSE_TOKEN:
key = 1;
message++;
if (do_fieldnames) {
fields = mysql_fetch_fields(qres);
- strncpy(numbuff, unparse_integer(0), 20);
+ strncpy(numbuff, unparse_integer(0), 19);
wenv[0] = numbuff;
for (i = 0; i < numfields && i < 9; i++) {
wenv[i + 1] = fields[i].name;
if (rownum++ > 0 || do_fieldnames) {
safe_str(osep, buff, bp);
}
- strncpy(numbuff, unparse_integer(rownum), 20);
+ strncpy(numbuff, unparse_integer(rownum), 19);
wenv[0] = numbuff;
for (i = 0; (i < numfields) && (i < 9); i++) {
wenv[i + 1] = row_p[i];
case 0:
while (current < stack + sizeof(stack)) {
*((*bp)++) = *(current++);
+ /* fall through */
case 7:
*((*bp)++) = *(current++);
+ /* fall through */
case 6:
*((*bp)++) = *(current++);
+ /* fall through */
case 5:
*((*bp)++) = *(current++);
+ /* fall through */
case 4:
*((*bp)++) = *(current++);
+ /* fall through */
case 3:
*((*bp)++) = *(current++);
+ /* fall through */
case 2:
*((*bp)++) = *(current++);
+ /* fall through */
case 1:
*((*bp)++) = *(current++);
}
pe_flags |= PE_DEBUG;
/* Populate the ufun object */
- strncpy(ufun->contents, atr_value(attrib), BUFFER_LEN);
+ strncpy(ufun->contents, atr_value(attrib), BUFFER_LEN - 1);
ufun->thing = thing;
ufun->pe_flags = pe_flags;
mp = desc_mail(thing);
notify_format(player, T("First mail sender: %d"), mp ? mp->from : NOTHING);
#endif
+ /* fall through */
case TYPE_THING:
notify_format(player, "Location: %d", Location(thing));
notify_format(player, "Home: %d", Home(thing));