From cacd2c2dd2ac791dae6063395890dbaf10a0ba47 Mon Sep 17 00:00:00 2001 From: wyld-sw Date: Fri, 20 Jan 2017 15:13:37 -0500 Subject: [PATCH] Addressed warnings from -Wall. --- changelog | 1 - lib/text/immlist | 1 + lib/text/wizlist | 1 + src/act.informative.c | 4 ++-- src/act.item.c | 2 +- src/act.wizard.c | 2 +- src/asciimap.c | 4 ++-- src/players.c | 2 +- 8 files changed, 9 insertions(+), 8 deletions(-) diff --git a/changelog b/changelog index 61e4828..f7a3f0f 100644 --- a/changelog +++ b/changelog @@ -6,7 +6,6 @@ Development moved to Github: https://github.com/tbamud/tbamud Changelog also available on Github: https://github.com/tbamud/tbamud/commits/master - Changes prior to Github transition: [Jun 21 2013] - Vatiken Added 'toupper' as a dg_script command to capitalize the first letter diff --git a/lib/text/immlist b/lib/text/immlist index 139ce76..3f0aa90 100644 --- a/lib/text/immlist +++ b/lib/text/immlist @@ -4,4 +4,5 @@ Immortals ~~~~~~~~~ + Wylder diff --git a/lib/text/wizlist b/lib/text/wizlist index f4137c5..6341531 100644 --- a/lib/text/wizlist +++ b/lib/text/wizlist @@ -4,6 +4,7 @@ Implementors ~~~~~~~~~~~~ + Wyld Greater Gods ~~~~~~~~~~~~ diff --git a/src/act.informative.c b/src/act.informative.c index 970d3d8..6993459 100644 --- a/src/act.informative.c +++ b/src/act.informative.c @@ -71,7 +71,7 @@ static void show_obj_to_char(struct obj_data *obj, struct char_data *ch, int mod } if ((mode == 0) && obj->description) { - if (!GET_OBJ_VAL(obj, 1) == 0 || OBJ_SAT_IN_BY(obj)) { + if (GET_OBJ_VAL(obj, 1) != 0 || OBJ_SAT_IN_BY(obj)) { temp = OBJ_SAT_IN_BY(obj); for (temp = OBJ_SAT_IN_BY(obj); temp; temp = NEXT_SITTING(temp)) { if (temp == ch) @@ -1481,7 +1481,7 @@ ACMD(do_users) "UNDEFINED", state, idletime, timestr); - if (d->host && *d->host) + if (*d->host) sprintf(line + strlen(line), "[%s]\r\n", d->host); else strcat(line, "[Hostname unknown]\r\n"); diff --git a/src/act.item.c b/src/act.item.c index 2ff2886..b45114a 100644 --- a/src/act.item.c +++ b/src/act.item.c @@ -880,7 +880,7 @@ ACMD(do_drink) send_to_char(ch, "Your stomach can't contain anymore!\r\n"); return; } - if ((GET_OBJ_VAL(temp, 1) == 0) || (!GET_OBJ_VAL(temp, 0) == 1)) { + if ((GET_OBJ_VAL(temp, 1) == 0) || (GET_OBJ_VAL(temp, 0) != 1)) { send_to_char(ch, "It is empty.\r\n"); return; } diff --git a/src/act.wizard.c b/src/act.wizard.c index 5c36755..470699c 100644 --- a/src/act.wizard.c +++ b/src/act.wizard.c @@ -4983,7 +4983,7 @@ ACMD(do_recent) ct = this->time; strftime(timestr, sizeof(timestr), "%a %b %d %H:%M:%S %Y", localtime(&ct)); - if (this->host && *(this->host)) { + if (*(this->host)) { if (!strcmp(this->host, "localhost")) loc = TRUE; } diff --git a/src/asciimap.c b/src/asciimap.c index 42f5e39..9c4104b 100644 --- a/src/asciimap.c +++ b/src/asciimap.c @@ -585,9 +585,9 @@ MapArea(target_room, ch, centre, centre, min, max, ns_size/2, ew_size/2, worldma char_size = 3*(size+1) + (size) + 4; if(worldmap) - send_to_char(ch, "%s", strpaste(strfrmt(str, GET_SCREEN_WIDTH(ch) - char_size, size*2 + 1, FALSE, TRUE, TRUE), WorldMap(centre, size, MAP_CIRCLE, MAP_COMPACT), " \tn")); + send_to_char(ch, "%s", strpaste(WorldMap(centre, size, MAP_CIRCLE, MAP_COMPACT), strfrmt(str, GET_SCREEN_WIDTH(ch) - char_size, size*2 + 1, FALSE, TRUE, TRUE), " \tn")); else - send_to_char(ch, "%s", strpaste(strfrmt(str, GET_SCREEN_WIDTH(ch) - char_size, size*2 + 1, FALSE, TRUE, TRUE), CompactStringMap(centre, size), " \tn")); + send_to_char(ch, "%s", strpaste(CompactStringMap(centre, size), strfrmt(str, GET_SCREEN_WIDTH(ch) - char_size, size*2 + 1, FALSE, TRUE, TRUE), " \tn")); } diff --git a/src/players.c b/src/players.c index fc9d8b3..fd3f278 100644 --- a/src/players.c +++ b/src/players.c @@ -514,7 +514,7 @@ void save_char(struct char_data * ch) /* If ch->desc is not null, then update session data before saving. */ if (ch->desc) { - if (ch->desc->host && *ch->desc->host) { + if (*ch->desc->host) { if (!GET_HOST(ch)) GET_HOST(ch) = strdup(ch->desc->host); else if (GET_HOST(ch) && strcmp(GET_HOST(ch), ch->desc->host)) {