diff options
author | Haruna <haru@dotalux.com> | 2013-12-16 19:25:58 -0800 |
---|---|---|
committer | Haruna <haru@dotalux.com> | 2013-12-16 19:25:58 -0800 |
commit | 8b84026c292fed6f6218278c870c4f8839fbd40a (patch) | |
tree | 4b62aa52844a1916db1f18faba8b9cf29ff30810 /src/map/irc-bot.c | |
parent | 9e223137eba56dcd41bececf4360f321c9117247 (diff) | |
parent | 3917562fc493c031bb20181b5d9ae6ab15ce9b76 (diff) | |
download | hercules-8b84026c292fed6f6218278c870c4f8839fbd40a.tar.gz hercules-8b84026c292fed6f6218278c870c4f8839fbd40a.tar.bz2 hercules-8b84026c292fed6f6218278c870c4f8839fbd40a.tar.xz hercules-8b84026c292fed6f6218278c870c4f8839fbd40a.zip |
Merge pull request #237 from HerculesWS/warnings
This adds an Xcode project file (for those who develop on OS X) and fixes several - potential or real - issues we detected thanks to its more strict warnings settings. It also updates the unix build script with similar warning settings.
Diffstat (limited to 'src/map/irc-bot.c')
-rw-r--r-- | src/map/irc-bot.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/map/irc-bot.c b/src/map/irc-bot.c index 2b6dcfccd..ff28082e7 100644 --- a/src/map/irc-bot.c +++ b/src/map/irc-bot.c @@ -152,7 +152,8 @@ int irc_parse(int fd) { * NULL, needs to be able to fit an IRC_HOST_LENGTH long string) */ void irc_parse_source(char *source, char *nick, char *ident, char *host) { - int i, len = strlen(source), pos = 0; + int i, pos = 0; + size_t len = strlen(source); unsigned char stage = 0; for(i = 0; i < len; i++) { @@ -208,7 +209,7 @@ void irc_parse_sub(int fd, char *str) { * @param str Command to send */ void irc_send(char *str) { - int len = strlen(str) + 2; + size_t len = strlen(str) + 2; if (len > IRC_MESSAGE_LENGTH-3) len = IRC_MESSAGE_LENGTH-3; WFIFOHEAD(ircbot->fd, len); @@ -298,7 +299,7 @@ void irc_privmsg(int fd, char *cmd, char *source, char *target, char *msg) { ircbot->parse_source(source,source_nick,source_ident,source_host); if( ircbot->channel ) { - int padding_len = strlen(ircbot->channel->name) + strlen(source_nick) + 13; + size_t padding_len = strlen(ircbot->channel->name) + strlen(source_nick) + 13; while (1) { snprintf(send_string, 150, "[ #%s ] IRC.%s : %s",ircbot->channel->name,source_nick,msg); clif->chsys_msg2(ircbot->channel,send_string); |