Skip to content

Commit b7214e5

Browse files
author
psotnic
committed
Added compile fix by Esio
1 parent b34fc89 commit b7214e5

9 files changed

+16
-16
lines changed

psotnic-current/class-chan-actions.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ int chan::invite(const char *nick)
249249

250250
if(!getUser(nick))
251251
{
252-
char *a = strchr(nick, '!');
252+
char *a = (char*) strchr(nick, '!');
253253
if(a) *a = '\0';
254254

255255
::invite.wisePush("INVITE ", nick, " ", (const char *) name, NULL);

psotnic-current/class-chan-gotmode.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ void chan::gotMode(const char *modes, const char *args, const char *mask)
9292
{
9393
if(chanModeRequiresArgument(mode[0][i], mode[1][i]))
9494
{
95-
a = strchr(args, ' ');
95+
a = (char *) strchr(args, ' ');
9696
if(a) mem_strncpy(arg[i], args, abs(args - a)+1);
9797
else
9898
{

psotnic-current/class-chan.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@ chanuser::chanuser(const char *str)
11371137
: CustomDataStorage()
11381138
#endif
11391139
{
1140-
char *a = strchr(str, '!');
1140+
char *a = (char *) strchr(str, '!');
11411141
if(a) mem_strncpy(nick, str, (int) abs(str - a) + 1);
11421142
else mem_strcpy(nick, str);
11431143

@@ -1158,8 +1158,8 @@ chanuser::chanuser(const char *m, const chan *ch, const int f, const bool scan)
11581158
: CustomDataStorage()
11591159
#endif
11601160
{
1161-
char *a = strchr(m, '!');
1162-
char *b = strchr(m, '@');
1161+
char *a = (char *) strchr(m, '!');
1162+
char *b = (char *) strchr(m, '@');
11631163

11641164
reason = NULL;
11651165

psotnic-current/class-client.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ void client::joinAllChannels()
457457

458458
void client::gotNickChange(const char *from, const char *to)
459459
{
460-
char *a = strchr(from, '!');
460+
char *a = (char *) strchr(from, '!');
461461
char *fromnick;
462462
chan *p = first;
463463

@@ -884,7 +884,7 @@ void client::gotUserQuit(const char *mask, const char *reason)
884884
chan *ch = first;
885885
int netsplit = reason && wasoptest::checkSplit(reason);
886886

887-
a = strchr(mask, '!');
887+
a = (char *) strchr(mask, '!');
888888
if(a) mem_strncpy(nick, mask, abs(a - mask) + 1);
889889
else mem_strcpy(nick, mask);
890890

psotnic-current/class-ent.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1329,8 +1329,8 @@ const char *entChattr::getValue() const
13291329
if(*pFlags)
13301330
{
13311331
snprintf(modes, sizeof(modes), "+%s", pFlags);
1332-
k = strchr(pFlags, 'k');
1333-
l = strchr(pFlags, 'l');
1332+
k = (char *) strchr(pFlags, 'k');
1333+
l = (char *) strchr(pFlags, 'l');
13341334
}
13351335
if(*mFlags)
13361336
{

psotnic-current/class-http.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ http::url::url(const char *u)
3030
mem_strcpy(link, u);
3131
u += 7;
3232

33-
char *a = strchr(u, '/');
33+
char *a = (char *) strchr(u, '/');
3434

3535
if(a)
3636
{

psotnic-current/class-server.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ void Server::Isupport::init()
123123
{
124124
if((p1=find("CHANLIMIT")))
125125
{
126-
if((p2=strchr(p1, ':')))
126+
if((p2=(char *)strchr(p1, ':')))
127127
{
128128
*p2++;
129129

@@ -140,7 +140,7 @@ void Server::Isupport::init()
140140
{
141141
if((p1=find("MAXLIST")))
142142
{
143-
if((p2=strchr(p1, ':')))
143+
if((p2= (char *) strchr(p1, ':')))
144144
{
145145
*p2++;
146146

psotnic-current/functions.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -731,8 +731,8 @@ bool extendhost(const char *host, char *buf, unsigned int len)
731731
if(strlen(host) + 10 > len || !isRealStr(host) || *host == '#')
732732
return false;
733733

734-
ex = strchr(host, '!');
735-
at = strchr(host, '@');
734+
ex = (char *) strchr(host, '!');
735+
at = (char *) strchr(host, '@');
736736

737737
if(ex != strrchr(host, '!') || at != strrchr(host, '@')) return false;
738738

@@ -797,7 +797,7 @@ void nickCreator(char *nick)
797797
continue;
798798
}
799799

800-
if((n=strchr(config.nickappend, nick[i])))
800+
if((n= (char *) strchr(config.nickappend, nick[i])))
801801
{
802802
n++;
803803
nick[i]=*n;

psotnic-current/match.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ int matchBan(const char *ban, const char *nick, const char *ident, const char *h
432432

433433
int matchIp(const char *bannedIp, const char *ip)
434434
{
435-
char *slash = strrchr(bannedIp, '/');
435+
char *slash = (char *) strrchr(bannedIp, '/');
436436

437437
if(!slash)
438438
return match(bannedIp, ip);

0 commit comments

Comments
 (0)