summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-19 02:46:37 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-19 02:49:41 +0300
commitc2c1322b230dc0f564397ac68615640f1083ee56 (patch)
tree9cbdf777c0636e16963f368cb9d9fc48f094ff13 /src/map/atcommand.c
parent5b74faa8afd04771af7acb918072ea71a3db475f (diff)
downloadhercules-c2c1322b230dc0f564397ac68615640f1083ee56.tar.gz
hercules-c2c1322b230dc0f564397ac68615640f1083ee56.tar.bz2
hercules-c2c1322b230dc0f564397ac68615640f1083ee56.tar.xz
hercules-c2c1322b230dc0f564397ac68615640f1083ee56.zip
Fix some cast discards 'const' qualifier from pointer target type warnings.
Add -Wcast-qual into configure comment.
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index eb48adc1d..4eb2051da 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -547,7 +547,7 @@ ACMD(jumpto) {
return false;
}
- if((pl_sd=map->nick2sd((char *)message)) == NULL && (pl_sd=map->charid2sd(atoi(message))) == NULL) {
+ if((pl_sd=map->nick2sd((const char *)message)) == NULL && (pl_sd=map->charid2sd(atoi(message))) == NULL) {
clif->message(fd, msg_fd(fd,3)); // Character not found.
return false;
}
@@ -2747,7 +2747,7 @@ ACMD(recall) {
return false;
}
- if((pl_sd=map->nick2sd((char *)message)) == NULL && (pl_sd=map->charid2sd(atoi(message))) == NULL) {
+ if((pl_sd=map->nick2sd((const char *)message)) == NULL && (pl_sd=map->charid2sd(atoi(message))) == NULL) {
clif->message(fd, msg_fd(fd,3)); // Character not found.
return false;
}
@@ -3072,7 +3072,7 @@ ACMD(kick)
return false;
}
- if((pl_sd=map->nick2sd((char *)message)) == NULL && (pl_sd=map->charid2sd(atoi(message))) == NULL) {
+ if((pl_sd=map->nick2sd((const char *)message)) == NULL && (pl_sd=map->charid2sd(atoi(message))) == NULL) {
clif->message(fd, msg_fd(fd,3)); // Character not found.
return false;
}
@@ -5123,7 +5123,7 @@ ACMD(follow) {
return true;
}
- if ((pl_sd = map->nick2sd((char *)message)) == NULL)
+ if ((pl_sd = map->nick2sd((const char *)message)) == NULL)
{
clif->message(fd, msg_fd(fd,3)); // Character not found.
return false;
@@ -5601,7 +5601,7 @@ ACMD(changegm) {
return false;
}
- if ((pl_sd=map->nick2sd((char *) message)) == NULL || pl_sd->status.guild_id != sd->status.guild_id) {
+ if ((pl_sd=map->nick2sd((const char *) message)) == NULL || pl_sd->status.guild_id != sd->status.guild_id) {
clif->message(fd, msg_fd(fd,1184)); // Target character must be online and be a guild member.
return false;
}
@@ -5621,7 +5621,7 @@ ACMD(changeleader) {
return false;
}
- if (party->changeleader(sd, map->nick2sd((char *) message)))
+ if (party->changeleader(sd, map->nick2sd((const char *) message)))
return true;
return false;
}
@@ -6380,7 +6380,7 @@ ACMD(trade) {
return false;
}
- if ( (pl_sd = map->nick2sd((char *)message)) == NULL ) {
+ if ( (pl_sd = map->nick2sd((const char *)message)) == NULL ) {
clif->message(fd, msg_fd(fd,3)); // Character not found.
return false;
}
@@ -6423,7 +6423,7 @@ ACMD(unmute) {
return false;
}
- if ((pl_sd = map->nick2sd((char *)message)) == NULL)
+ if ((pl_sd = map->nick2sd((const char *)message)) == NULL)
{
clif->message(fd, msg_fd(fd,3)); // Character not found.
return false;
@@ -7667,7 +7667,7 @@ ACMD(showdelay)
*------------------------------------------*/
ACMD(invite) {
unsigned int did = sd->duel_group;
- struct map_session_data *target_sd = map->nick2sd((char *)message);
+ struct map_session_data *target_sd = map->nick2sd((const char *)message);
if (did == 0)
{
@@ -7740,7 +7740,7 @@ ACMD(duel) {
duel->create(sd, maxpl);
} else {
struct map_session_data *target_sd;
- target_sd = map->nick2sd((char *)message);
+ target_sd = map->nick2sd((const char *)message);
if (target_sd != NULL) {
unsigned int newduel;
if ((newduel = duel->create(sd, 2)) != -1) {
@@ -7882,7 +7882,7 @@ ACMD(clone) {
return false;
}
- if ((pl_sd=map->nick2sd((char *)message)) == NULL && (pl_sd=map->charid2sd(atoi(message))) == NULL) {
+ if ((pl_sd=map->nick2sd((const char *)message)) == NULL && (pl_sd=map->charid2sd(atoi(message))) == NULL) {
clif->message(fd, msg_fd(fd,3)); // Character not found.
return false;
}