Fix compiler warnings in macos build.

This commit is contained in:
Bart House
2018-11-23 12:27:55 -08:00
parent cff9fb441a
commit 0d59f1a22b
8 changed files with 47 additions and 46 deletions

View File

@@ -3359,21 +3359,21 @@ retry:
} else if (!strcmpi(bp, "looking glass")) {
; /* avoid false hit on "* glass" */
} else if (!BSTRCMPI(bp, p - 6, " glass") || !strcmpi(bp, "glass")) {
register char *g = bp;
register char *s = bp;
/* treat "broken glass" as a non-existent item; since "broken" is
also a chest/box prefix it might have been stripped off above */
if (broken || strstri(g, "broken"))
if (broken || strstri(s, "broken"))
return (struct obj *) 0;
if (!strncmpi(g, "worthless ", 10))
g += 10;
if (!strncmpi(g, "piece of ", 9))
g += 9;
if (!strncmpi(g, "colored ", 8))
g += 8;
else if (!strncmpi(g, "coloured ", 9))
g += 9;
if (!strcmpi(g, "glass")) { /* choose random color */
if (!strncmpi(s, "worthless ", 10))
s += 10;
if (!strncmpi(s, "piece of ", 9))
s += 9;
if (!strncmpi(s, "colored ", 8))
s += 8;
else if (!strncmpi(s, "coloured ", 9))
s += 9;
if (!strcmpi(s, "glass")) { /* choose random color */
/* 9 different kinds */
typ = LAST_GEM + rnd(9);
if (objects[typ].oc_class == GEM_CLASS)
@@ -3384,7 +3384,7 @@ retry:
char tbuf[BUFSZ];
Strcpy(tbuf, "worthless piece of ");
Strcat(tbuf, g); /* assume it starts with the color */
Strcat(tbuf, s); /* assume it starts with the color */
Strcpy(bp, tbuf);
}
}