diff options
39 files changed, 98 insertions, 98 deletions
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index 50d6214b04..1f2530a0b6 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -1234,7 +1234,7 @@ skipbg: } case WM_TIMER: - if ((int)wParam == TM_AUTOALPHA) { + if (wParam == TM_AUTOALPHA) { int inwnd; if (GetForegroundWindow() == hwnd) { diff --git a/plugins/FTPFileYM/curl/lib/netrc.c b/plugins/FTPFileYM/curl/lib/netrc.c index e35328a9ed..6ff92bb33f 100644 --- a/plugins/FTPFileYM/curl/lib/netrc.c +++ b/plugins/FTPFileYM/curl/lib/netrc.c @@ -106,7 +106,7 @@ int Curl_parsenetrc(const char *host, char *tok_buf; bool done=FALSE; char netrcbuffer[256]; - int netrcbuffsize = (int)sizeof(netrcbuffer); + int netrcbuffsize = sizeof(netrcbuffer); while(!done && fgets(netrcbuffer, netrcbuffsize, file)) { tok=strtok_r(netrcbuffer, " \t\n", &tok_buf); diff --git a/plugins/FTPFileYM/curl/lib/security.c b/plugins/FTPFileYM/curl/lib/security.c index 508c7b41ec..fa05207617 100644 --- a/plugins/FTPFileYM/curl/lib/security.c +++ b/plugins/FTPFileYM/curl/lib/security.c @@ -80,7 +80,7 @@ static enum protection_level name_to_level(const char *name) { int i; - for(i = 0; i < (int)sizeof(level_names)/(int)sizeof(level_names[0]); i++) + for(i = 0; i < sizeof(level_names)/sizeof(level_names[0]); i++) if(checkprefix(name, level_names[i].name)) return level_names[i].level; return PROT_NONE; diff --git a/plugins/FTPFileYM/curl/lib/ssluse.c b/plugins/FTPFileYM/curl/lib/ssluse.c index c747420f60..25ece337a1 100644 --- a/plugins/FTPFileYM/curl/lib/ssluse.c +++ b/plugins/FTPFileYM/curl/lib/ssluse.c @@ -933,7 +933,7 @@ int Curl_ossl_shutdown(struct connectdata *conn, int sockindex) (void)SSL_shutdown(connssl->handle); if(connssl->handle) { - buffsize = (int)sizeof(buf); + buffsize = sizeof(buf); while(!done) { int what = Curl_socket_ready(conn->sock[sockindex], CURL_SOCKET_BAD, SSL_SHUTDOWN_TIMEOUT); diff --git a/plugins/FTPFileYM/curl/lib/telnet.c b/plugins/FTPFileYM/curl/lib/telnet.c index 3206ee1137..366825078c 100644 --- a/plugins/FTPFileYM/curl/lib/telnet.c +++ b/plugins/FTPFileYM/curl/lib/telnet.c @@ -972,7 +972,7 @@ static void suboption(struct connectdata *conn) for(v = tn->telnet_vars;v;v = v->next) { tmplen = (strlen(v->data) + 1); /* Add the variable only if it fits */ - if(len + tmplen < (int)sizeof(temp)-6) { + if(len + tmplen < sizeof(temp)-6) { sscanf(v->data, "%127[^,],%127s", varname, varval); snprintf((char *)&temp[len], sizeof(temp) - len, "%c%s%c%s", CURL_NEW_ENV_VAR, varname, diff --git a/plugins/FavContacts/src/http_api.cpp b/plugins/FavContacts/src/http_api.cpp index bacc6b05b0..a201c6cbda 100644 --- a/plugins/FavContacts/src/http_api.cpp +++ b/plugins/FavContacts/src/http_api.cpp @@ -79,7 +79,7 @@ public: Send("SetContact(");
Send(i);
Send(", ");
- Send((int)hContact);
+ Send((int)hContact);// XXX: x64 broken!?
Send(", '");
SendQuoted(name);
Send("', ");
diff --git a/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp b/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp index f7ea8c2167..2a6e994056 100644 --- a/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp +++ b/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp @@ -6,7 +6,7 @@ BBButton OTRButton; int SVC_IconPressed(WPARAM hContact, LPARAM lParam)
{
StatusIconClickData *sicd = (StatusIconClickData *)lParam;
- if(sicd->cbSize < (int)sizeof(StatusIconClickData))
+ if(sicd->cbSize < sizeof(StatusIconClickData))
return 0;
if(strcmp(sicd->szModule, MODULENAME) == 0) {
@@ -93,7 +93,7 @@ int SVC_ButtonsBarLoaded(WPARAM, LPARAM) int SVC_ButtonsBarPressed(WPARAM w, LPARAM l)
{
CustomButtonClickData* cbcd = (CustomButtonClickData *)l;
- if (cbcd->cbSize == (int)sizeof(CustomButtonClickData) && cbcd->dwButtonId == 0 && strcmp(cbcd->pszModule, MODULENAME)==0) {
+ if (cbcd->cbSize == sizeof(CustomButtonClickData) && cbcd->dwButtonId == 0 && strcmp(cbcd->pszModule, MODULENAME)==0) {
MCONTACT hContact = (MCONTACT)w;
char *proto = GetContactProto(hContact);
diff --git a/plugins/MirOTR/libgcrypt-1.4.6/random/rndw32.c b/plugins/MirOTR/libgcrypt-1.4.6/random/rndw32.c index 05cc952b7a..56422a4242 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/random/rndw32.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/random/rndw32.c @@ -344,7 +344,7 @@ read_mbm_data (void (*add)(const void*, size_t, enum random_origins), { if (debug_me) log_debug ("rndw32#read_mbm_data: got %d bytes\n", - (int)sizeof (SharedData)); + sizeof (SharedData)); (*add) (mbmDataPtr, sizeof (SharedData), requester); UnmapViewOfFile (mbmDataPtr); } diff --git a/plugins/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp index 52fab9f724..d99cc7c129 100644 --- a/plugins/NoHistory/src/dllmain.cpp +++ b/plugins/NoHistory/src/dllmain.cpp @@ -212,7 +212,7 @@ int WindowEvent(WPARAM wParam, LPARAM lParam) int IconPressed(WPARAM hContact, LPARAM lParam)
{
StatusIconClickData *sicd = (StatusIconClickData *)lParam;
- if (sicd->cbSize < (int)sizeof(StatusIconClickData))
+ if (sicd->cbSize < sizeof(StatusIconClickData))
return 0;
if (sicd->flags & MBCF_RIGHTBUTTON) return 0; // ignore right-clicks
diff --git a/plugins/Spamotron/src/sqlite3/sqlite3.c b/plugins/Spamotron/src/sqlite3/sqlite3.c index 5619089543..ec6d4d2c68 100644 --- a/plugins/Spamotron/src/sqlite3/sqlite3.c +++ b/plugins/Spamotron/src/sqlite3/sqlite3.c @@ -13651,7 +13651,7 @@ static int memsys5Init(void *NotUsed){ nMinLog = memsys5Log(sqlite3GlobalConfig.mnReq); mem5.nAtom = (1<<nMinLog); - while( (int)sizeof(Mem5Link)>mem5.nAtom ){ + while( sizeof(Mem5Link)>mem5.nAtom ){ mem5.nAtom = mem5.nAtom << 1; } @@ -15853,7 +15853,7 @@ static char et_getdigit(LONGDOUBLE_TYPE *val, int *cnt){ */ static void appendSpace(StrAccum *pAccum, int N){ static const char zSpaces[] = " "; - while( N>=(int)sizeof(zSpaces)-1 ){ + while( N>=sizeof(zSpaces)-1 ){ sqlite3StrAccumAppend(pAccum, zSpaces, sizeof(zSpaces)-1); N -= sizeof(zSpaces)-1; } @@ -20370,7 +20370,7 @@ static int os2Randomness(sqlite3_vfs *pVfs, int nBuf, char *zBuf ){ memset(zBuf, 0, nBuf); #else int sizeofULong = sizeof(ULONG); - if( (int)sizeof(DATETIME) <= nBuf - n ){ + if( sizeof(DATETIME) <= nBuf - n ){ DATETIME x; DosGetDateTime(&x); memcpy(&zBuf[n], &x, sizeof(x)); @@ -46172,7 +46172,7 @@ static char *displayP4(Op *pOp, char *zTemp, int nTemp){ SQLITE_PRIVATE void sqlite3VdbeUsesBtree(Vdbe *p, int i){ int mask; assert( i>=0 && i<p->db->nDb ); - assert( i<(int)sizeof(p->btreeMask)*8 ); + assert( i<sizeof(p->btreeMask)*8 ); mask = 1<<i; if( (p->btreeMask & mask)==0 ){ p->btreeMask |= mask; @@ -49626,7 +49626,7 @@ static const unsigned char opcodeProperty[] = OPFLG_INITIALIZER; ** specified by mask. */ SQLITE_PRIVATE int sqlite3VdbeOpcodeHasProperty(int opcode, int mask){ - assert( opcode>0 && opcode<(int)sizeof(opcodeProperty) ); + assert( opcode>0 && opcode<sizeof(opcodeProperty) ); return (opcodeProperty[opcode]&mask)!=0; } @@ -89207,7 +89207,7 @@ static int setupLookaside(sqlite3 *db, void *pBuf, int sz, int cnt){ /* The size of a lookaside slot needs to be larger than a pointer ** to be useful. */ - if( sz<=(int)sizeof(LookasideSlot*) ) sz = 0; + if( sz<=sizeof(LookasideSlot*) ) sz = 0; if( cnt<0 ) cnt = 0; if( sz==0 || cnt==0 ){ sz = 0; @@ -89227,7 +89227,7 @@ static int setupLookaside(sqlite3 *db, void *pBuf, int sz, int cnt){ if( pStart ){ int i; LookasideSlot *p; - assert( sz > (int)sizeof(LookasideSlot*) ); + assert( sz > sizeof(LookasideSlot*) ); p = (LookasideSlot*)pStart; for(i=cnt-1; i>=0; i--){ p->pNext = db->lookaside.pFree; diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index 5f74bbd09c..e2539763d2 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -1990,7 +1990,7 @@ int TSAPI CutContactName(const TCHAR *oldname, TCHAR *newname, unsigned int size { int cutMax = PluginConfig.m_CutContactNameTo; - if ((int)lstrlen(oldname) <= cutMax) { + if (lstrlen(oldname) <= cutMax) { lstrcpyn(newname, oldname, size); newname[size - 1] = 0; } diff --git a/plugins/WinterSpeak/src/SpeakAnnounce.cpp b/plugins/WinterSpeak/src/SpeakAnnounce.cpp index 766e2e90eb..c7f87b26e8 100644 --- a/plugins/WinterSpeak/src/SpeakAnnounce.cpp +++ b/plugins/WinterSpeak/src/SpeakAnnounce.cpp @@ -122,7 +122,7 @@ void SpeakAnnounce::protocolAck(ACKDATA *ack) return;
}
- if (ID_STATUS_CONNECTING != (int)ack->hProcess)
+ if (ID_STATUS_CONNECTING != (INT_PTR)ack->hProcess)
{
return;
}
diff --git a/plugins/Zlib/src/zlib.h b/plugins/Zlib/src/zlib.h index 3e0c7672ac..7108fdafb3 100644 --- a/plugins/Zlib/src/zlib.h +++ b/plugins/Zlib/src/zlib.h @@ -1645,18 +1645,18 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, const char *version, int stream_size)); #define deflateInit(strm, level) \ - deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) + deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream)) #define inflateInit(strm) \ - inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) + inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream)) #define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ - (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) + (strategy), ZLIB_VERSION, sizeof(z_stream)) #define inflateInit2(strm, windowBits) \ inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ - (int)sizeof(z_stream)) + sizeof(z_stream)) #define inflateBackInit(strm, windowBits, window) \ inflateBackInit_((strm), (windowBits), (window), \ - ZLIB_VERSION, (int)sizeof(z_stream)) + ZLIB_VERSION, sizeof(z_stream)) #ifndef Z_SOLO diff --git a/plugins/Zlib/src/zutil.c b/plugins/Zlib/src/zutil.c index 23d2ebef00..f0fef231f2 100644 --- a/plugins/Zlib/src/zutil.c +++ b/plugins/Zlib/src/zutil.c @@ -37,25 +37,25 @@ uLong ZEXPORT zlibCompileFlags() uLong flags; flags = 0; - switch ((int)(sizeof(uInt))) { + switch (sizeof(uInt)) { case 2: break; case 4: flags += 1; break; case 8: flags += 2; break; default: flags += 3; } - switch ((int)(sizeof(uLong))) { + switch (sizeof(uLong)) { case 2: break; case 4: flags += 1 << 2; break; case 8: flags += 2 << 2; break; default: flags += 3 << 2; } - switch ((int)(sizeof(voidpf))) { + switch (sizeof(voidpf)) { case 2: break; case 4: flags += 1 << 4; break; case 8: flags += 2 << 4; break; default: flags += 3 << 4; } - switch ((int)(sizeof(z_off_t))) { + switch (sizeof(z_off_t)) { case 2: break; case 4: flags += 1 << 6; break; case 8: flags += 2 << 6; break; diff --git a/protocols/EmLanProto/src/mlan.cpp b/protocols/EmLanProto/src/mlan.cpp index 669f873090..945a6a16b7 100644 --- a/protocols/EmLanProto/src/mlan.cpp +++ b/protocols/EmLanProto/src/mlan.cpp @@ -449,10 +449,10 @@ void CMLan::RecvMessageUrl(CCSDATA* ccs) db_event_add(ccs->hContact, &dbei); } -int CMLan::AddToContactList(u_int flags, EMPSEARCHRESULT* psr) +INT_PTR CMLan::AddToContactList(u_int flags, EMPSEARCHRESULT* psr) { if (psr->hdr.cbSize!=sizeof(EMPSEARCHRESULT)) - return (int)(HANDLE)NULL; + return 0; in_addr addr; addr.S_un.S_addr = psr->ipaddr; @@ -465,7 +465,7 @@ int CMLan::AddToContactList(u_int flags, EMPSEARCHRESULT* psr) db_set_w(contact,PROTONAME,"RemoteVersion", psr->ver ); } - return (int)contact; + return (INT_PTR)contact; } int CMLan::SendMessageUrl(CCSDATA* ccs, bool isUrl) diff --git a/protocols/EmLanProto/src/mlan.h b/protocols/EmLanProto/src/mlan.h index 71d4182dfa..d3f518b04d 100644 --- a/protocols/EmLanProto/src/mlan.h +++ b/protocols/EmLanProto/src/mlan.h @@ -58,7 +58,7 @@ public: int RecvAwayMsg(CCSDATA* ccs);
int SetAwayMsg(u_int status, char* msg);
- int AddToContactList(u_int flags, EMPSEARCHRESULT* psr);
+ INT_PTR AddToContactList(u_int flags, EMPSEARCHRESULT* psr);
int Search(const char* name);
void LoadSettings();
void SaveSettings();
diff --git a/protocols/IcqOscarJ/src/icq_rates.cpp b/protocols/IcqOscarJ/src/icq_rates.cpp index a77f49c90b..d71c0ada22 100644 --- a/protocols/IcqOscarJ/src/icq_rates.cpp +++ b/protocols/IcqOscarJ/src/icq_rates.cpp @@ -223,7 +223,7 @@ int rates::getLimitLevel(WORD wGroup, int nLevel) void rates::initAckPacket(icq_packet *pPacket)
{
- serverPacketInit(pPacket, 10 + nGroups * (int)sizeof(WORD));
+ serverPacketInit(pPacket, 10 + nGroups * sizeof(WORD));
packFNACHeader(pPacket, ICQ_SERVICE_FAMILY, ICQ_CLIENT_RATE_ACK);
for (WORD wGroup = 1; wGroup <= nGroups; wGroup++)
packWord(pPacket, wGroup);
diff --git a/protocols/IcqOscarJ/src/oscar_filetransfer.cpp b/protocols/IcqOscarJ/src/oscar_filetransfer.cpp index 7c7e093769..673d072561 100644 --- a/protocols/IcqOscarJ/src/oscar_filetransfer.cpp +++ b/protocols/IcqOscarJ/src/oscar_filetransfer.cpp @@ -2090,7 +2090,7 @@ void CIcqProto::oft_sendPeerInit(oscar_connection *oc) ft->wEncoding = 2; // ucs-2
WCHAR *pwsThisFile = make_unicode_string(pszThisFileName);
SAFE_FREE((void**)&pszThisFileName);
- ft->cbRawFileName = strlennull(pwsThisFile) * (int)sizeof(WCHAR) + 2;
+ ft->cbRawFileName = strlennull(pwsThisFile) * sizeof(WCHAR) + 2;
if (ft->cbRawFileName < 64)
ft->cbRawFileName = 64;
ft->rawFileName = (char*)SAFE_MALLOC(ft->cbRawFileName);
diff --git a/protocols/IcqOscarJ/src/stdpackets.cpp b/protocols/IcqOscarJ/src/stdpackets.cpp index 7f20732276..735dbabcd7 100644 --- a/protocols/IcqOscarJ/src/stdpackets.cpp +++ b/protocols/IcqOscarJ/src/stdpackets.cpp @@ -330,7 +330,7 @@ DWORD CIcqProto::icq_SendChannel1Message(DWORD dwUin, char *szUID, MCONTACT hCon DWORD CIcqProto::icq_SendChannel1MessageW(DWORD dwUin, char *szUID, MCONTACT hContact, WCHAR *pszText, cookie_message_data *pCookieData)
{
- WORD wMessageLen = strlennull(pszText) * (int)sizeof(WCHAR);
+ WORD wMessageLen = strlennull(pszText) * sizeof(WCHAR);
DWORD dwCookie = AllocateCookie(CKT_MESSAGE, 0, hContact, (void*)pCookieData);
WORD wPacketLength = (pCookieData->nAckType == ACKTYPE_SERVER) ? 26 : 22;
diff --git a/protocols/Sametime/src/glib/gnulib/vasnprintf.c b/protocols/Sametime/src/glib/gnulib/vasnprintf.c index c981059f95..d37027a670 100644 --- a/protocols/Sametime/src/glib/gnulib/vasnprintf.c +++ b/protocols/Sametime/src/glib/gnulib/vasnprintf.c @@ -137,7 +137,7 @@ print_long_long (char *buf, /* Build number */ pointer = bufferend = &buffer[sizeof(buffer) - 1]; *pointer-- = '\0'; - for (i = 1; i < (int)sizeof(buffer); i++) + for (i = 1; i < sizeof(buffer); i++) { *pointer-- = digits[number % base]; number /= base; diff --git a/protocols/SkypeClassic/src/skype.cpp b/protocols/SkypeClassic/src/skype.cpp index d9f8502980..52d08a6a45 100644 --- a/protocols/SkypeClassic/src/skype.cpp +++ b/protocols/SkypeClassic/src/skype.cpp @@ -1689,12 +1689,12 @@ void LaunchSkypeAndSetStatusThread(void *) { if (bLaunching) return;
bLaunching = TRUE;
LOG(("LaunchSkypeAndSetStatusThread started."));
- InterlockedExchange((long *)&SkypeStatus, (int)ID_STATUS_CONNECTING);
+ InterlockedExchange((long *)&SkypeStatus, ID_STATUS_CONNECTING);
ProtoBroadcastAck(SKYPE_PROTONAME, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, SkypeStatus);
if (ConnectToSkypeAPI(skype_path, 1) != -1) {
pthread_create((pThreadFunc)SkypeSystemInit, NULL);
- //InterlockedExchange((long *)&SkypeStatus, (int)newStatus);
+ //InterlockedExchange((long *)&SkypeStatus, newStatus);
//ProtoBroadcastAck(SKYPE_PROTONAME, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, SkypeStatus);
SetUserStatus();
}
@@ -2251,17 +2251,17 @@ INT_PTR SkypeSetStatus(WPARAM wParam, LPARAM lParam) //if (!SkypeInitialized && !db_get_b(NULL, SKYPE_PROTONAME, "UnloadOnOffline", 0)) return 0;
// Workaround for Skype status-bug
- if ((int)wParam == ID_STATUS_OFFLINE) logoff_contacts(TRUE);
- if (SkypeStatus == (int)wParam) return 0;
+ if (wParam == ID_STATUS_OFFLINE) logoff_contacts(TRUE);
+ if (SkypeStatus == wParam) return 0;
oldStatus = SkypeStatus;
- if ((int)wParam == ID_STATUS_CONNECTING) return 0;
+ if (wParam == ID_STATUS_CONNECTING) return 0;
#ifdef MAPDND
- if ((int)wParam == ID_STATUS_OCCUPIED || (int)wParam == ID_STATUS_ONTHEPHONE) wParam = ID_STATUS_DND;
- if ((int)wParam == ID_STATUS_OUTTOLUNCH) wParam = ID_STATUS_NA;
+ if (wParam == ID_STATUS_OCCUPIED || wParam == ID_STATUS_ONTHEPHONE) wParam = ID_STATUS_DND;
+ if (wParam == ID_STATUS_OUTTOLUNCH) wParam = ID_STATUS_NA;
#endif
#ifdef MAPNA
- if ((int)wParam==ID_STATUS_NA) wParam = ID_STATUS_AWAY;
+ if (wParam==ID_STATUS_NA) wParam = ID_STATUS_AWAY;
#endif
RequestedStatus = MirandaStatusToSkype((int)wParam);
@@ -2269,12 +2269,12 @@ INT_PTR SkypeSetStatus(WPARAM wParam, LPARAM lParam) /*
if (SkypeStatus != ID_STATUS_OFFLINE)
{
- InterlockedExchange((long*)&SkypeStatus, (int)wParam);
+ InterlockedExchange((long*)&SkypeStatus, wParam);
ProtoBroadcastAck(SKYPE_PROTONAME, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, SkypeStatus);
}
*/
- if ((int)wParam == ID_STATUS_OFFLINE && UnloadOnOffline)
+ if (wParam == ID_STATUS_OFFLINE && UnloadOnOffline)
{
if (UseCustomCommand)
{
@@ -2809,7 +2809,7 @@ INT_PTR SkypeAddToListByEvent(WPARAM wParam, LPARAM) { {
MCONTACT hContact = add_contact(pBlob + sizeof(DWORD) + sizeof(HANDLE), LOWORD(wParam));
free(pBlob);
- if (hContact) return (int)hContact;
+ if (hContact) return (INT_PTR)hContact;
}
return 0;
}
diff --git a/protocols/SkypeClassic/src/skypeapi.cpp b/protocols/SkypeClassic/src/skypeapi.cpp index 7c560bf510..afbde43ec8 100644 --- a/protocols/SkypeClassic/src/skypeapi.cpp +++ b/protocols/SkypeClassic/src/skypeapi.cpp @@ -169,7 +169,7 @@ void sendThread(char *dummy) { // Go offline
logoff_contacts(FALSE);
oldstatus=SkypeStatus;
- InterlockedExchange((long *)&SkypeStatus, (int)ID_STATUS_OFFLINE);
+ InterlockedExchange((long *)&SkypeStatus, ID_STATUS_OFFLINE);
ProtoBroadcastAck(SKYPE_PROTONAME, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldstatus, SkypeStatus);
}
// Reconnect to Skype
diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp index d89f87e923..df4a9686e3 100644 --- a/protocols/Xfire/src/main.cpp +++ b/protocols/Xfire/src/main.cpp @@ -1285,12 +1285,12 @@ INT_PTR GetXStatusIcon(WPARAM wParam, LPARAM lParam) { if (lParam == LR_SHARED)
{
if (wParam > 1)
- return (int)xgamelist.iconmngr.getGameIconFromId(wParam - 2); //icocache[(int)wParam-2].hicon;
+ return (INT_PTR)xgamelist.iconmngr.getGameIconFromId(wParam - 2); //icocache[(int)wParam-2].hicon;
}
else
{
if (wParam > 1)
- return (int)CopyIcon((HICON)xgamelist.iconmngr.getGameIconFromId(wParam - 2)/*icocache[(int)wParam-2].hicon*/);
+ return (INT_PTR)CopyIcon((HICON)xgamelist.iconmngr.getGameIconFromId(wParam - 2)/*icocache[(int)wParam-2].hicon*/);
}
return 0;
@@ -1421,8 +1421,8 @@ INT_PTR TMLoadIcon(WPARAM wParam, LPARAM lParam) {
if (LOWORD(wParam) == PLI_PROTOCOL) {
if (wParam & PLIF_ICOLIB)
- return (int)Skin_GetIcon("XFIRE_main");
- return (int)CopyIcon(Skin_GetIcon("XFIRE_main"));
+ return (INT_PTR)Skin_GetIcon("XFIRE_main");
+ return (INT_PTR)CopyIcon(Skin_GetIcon("XFIRE_main"));
}
return NULL;
}
diff --git a/protocols/Yahoo/src/avatar.cpp b/protocols/Yahoo/src/avatar.cpp index 063231212a..5e2f99ceca 100644 --- a/protocols/Yahoo/src/avatar.cpp +++ b/protocols/Yahoo/src/avatar.cpp @@ -48,7 +48,7 @@ int YAHOO_avt_hash(const char *key, DWORD len) /**************** Send Avatar ********************/
-void upload_avt(int id, int fd, int error, void *data)
+void upload_avt(int id, INT_PTR fd, int error, void *data)
{
struct yahoo_file_info *sf = (struct yahoo_file_info*) data;
unsigned long size = 0;
diff --git a/protocols/Yahoo/src/chat.cpp b/protocols/Yahoo/src/chat.cpp index 1130a248af..7b25099304 100644 --- a/protocols/Yahoo/src/chat.cpp +++ b/protocols/Yahoo/src/chat.cpp @@ -150,7 +150,7 @@ void ext_yahoo_chat_cat_xml(int id, const char *xml) {
}
-void ext_yahoo_chat_join(int id, const char *me, const char *room, const char * topic, YList *members, int fd)
+void ext_yahoo_chat_join(int id, const char *me, const char *room, const char * topic, YList *members, INT_PTR fd)
{
for (YList *l = members; l; l = l->next) free(l->data);
y_list_free(members);
diff --git a/protocols/Yahoo/src/file_transfer.cpp b/protocols/Yahoo/src/file_transfer.cpp index 4b2497574a..9d477785de 100644 --- a/protocols/Yahoo/src/file_transfer.cpp +++ b/protocols/Yahoo/src/file_transfer.cpp @@ -148,7 +148,7 @@ static void free_ft(y_filetransfer* ft) LOG(("[/free_ft]"));
}
-static void upload_file(int id, int fd, int error, void *data)
+static void upload_file(int id, INT_PTR fd, int error, void *data)
{
y_filetransfer *sf = (y_filetransfer*) data;
struct yahoo_file_info *fi = (struct yahoo_file_info *)sf->files->data;
@@ -281,7 +281,7 @@ static void upload_file(int id, int fd, int error, void *data) }
}
-static void dl_file(int id, int fd, int error, const char *filename, unsigned long size, void *data)
+static void dl_file(int id, INT_PTR fd, int error, const char *filename, unsigned long size, void *data)
{
y_filetransfer *sf = (y_filetransfer*) data;
struct yahoo_file_info *fi = (struct yahoo_file_info *)sf->files->data;
diff --git a/protocols/Yahoo/src/libyahoo2/libyahoo2.cpp b/protocols/Yahoo/src/libyahoo2/libyahoo2.cpp index 1b178f580e..aa365d8631 100644 --- a/protocols/Yahoo/src/libyahoo2/libyahoo2.cpp +++ b/protocols/Yahoo/src/libyahoo2/libyahoo2.cpp @@ -131,7 +131,7 @@ struct yahoo_input_data { struct yahoo_webcam_data *wcd; struct yahoo_search_state *ys; - int fd; + INT_PTR fd; enum yahoo_connection_type type; unsigned char *rxqueue; @@ -161,7 +161,7 @@ typedef struct { char *name; }value_string; -static int yahoo_send_data(int fd, const char *data, int len); +static int yahoo_send_data(INT_PTR fd, const char *data, int len); int yahoo_log_message(char * fmt, ...) { @@ -604,7 +604,7 @@ static struct yahoo_input_data * find_input_by_id_and_type(int id, enum yahoo_co return NULL; } -static struct yahoo_input_data * find_input_by_id_and_fd(int id, int fd) +static struct yahoo_input_data * find_input_by_id_and_fd(int id, INT_PTR fd) { YList *l; LOG(("find_input_by_id_and_fd")); @@ -1032,7 +1032,7 @@ static void yahoo_packet_free(struct yahoo_packet *pkt) FREE(pkt); } -static int yahoo_send_data(int fd, const char *data, int len) +static int yahoo_send_data(INT_PTR fd, const char *data, int len) { int ret; int e; @@ -1606,8 +1606,6 @@ static void yahoo_process_conference(struct yahoo_input_data *yid, struct yahoo_ if (pair->key == 14) /* decline/conf message */ msg = pair->value; - if (pair->key == 13) - ; if (pair->key == 16) /* error */ msg = pair->value; @@ -3606,7 +3604,7 @@ static void yahoo_process_yab_update(struct yahoo_input_data *yid, struct yahoo_ //YAHOO_CALLBACK(ext_yahoo_got_ping)(yid->yd->client_id, errormsg); } -static void _yahoo_webcam_get_server_connected(int fd, int error, void *d) +static void _yahoo_webcam_get_server_connected(INT_PTR fd, int error, void *d) { struct yahoo_input_data *yid = (struct yahoo_input_data *) d; char *who = yid->wcm->user; @@ -4266,7 +4264,7 @@ static int yahoo_get_webcam_data(struct yahoo_input_data *yid) return 0; } -int yahoo_write_ready(int id, int fd, void *data) +int yahoo_write_ready(int id, INT_PTR fd, void *data) { struct yahoo_input_data *yid = (struct yahoo_input_data *) data; int len; @@ -4502,7 +4500,7 @@ static void yahoo_process_search_connection(struct yahoo_input_data *yid, int ov } } -static void _yahoo_webcam_connected(int fd, int error, void *d) +static void _yahoo_webcam_connected(INT_PTR fd, int error, void *d) { struct yahoo_input_data *yid = (struct yahoo_input_data *) d; struct yahoo_webcam * wcm = yid->wcm; @@ -4658,7 +4656,7 @@ static void yahoo_process_webcam_master_connection(struct yahoo_input_data *yid, static void yahoo_process_webcam_connection(struct yahoo_input_data *yid, int over) { int id = yid->yd->client_id; - int fd = yid->fd; + INT_PTR fd = yid->fd; if (over) return; @@ -4678,7 +4676,7 @@ static void (*yahoo_process_connection[])(struct yahoo_input_data *, int over) = yahoo_process_search_connection }; -int yahoo_read_ready(int id, int fd, void *data) +int yahoo_read_ready(int id, INT_PTR fd, void *data) { struct yahoo_input_data *yid = (struct yahoo_input_data *) data; struct yahoo_server_settings *yss; @@ -4797,7 +4795,7 @@ struct connect_callback_data { int type; }; -static void yahoo_connected(int fd, int error, void *data) +static void yahoo_connected(INT_PTR fd, int error, void *data) { struct connect_callback_data *ccd = (struct connect_callback_data *) data; struct yahoo_data *yd = ccd->yd; @@ -5140,7 +5138,7 @@ void yahoo_get_list(int id) } } -static void _yahoo_http_connected(int id, int fd, int error, void *data) +static void _yahoo_http_connected(int id, INT_PTR fd, int error, void *data) { struct yahoo_input_data *yid = (struct yahoo_input_data *) data; if (fd <= 0) { @@ -6036,12 +6034,12 @@ struct send_file_data { void *user_data; }; -static void _yahoo_send_file_connected(int id, int fd, int error, void *data) +static void _yahoo_send_file_connected(int id, INT_PTR fd, int error, void *data) { struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_FT); struct send_file_data *sfd = (struct send_file_data *) data; struct yahoo_packet *pkt = sfd->pkt; - char buff[1024]; + unsigned char buff[1024]; if (fd <= 0) { sfd->callback(id, fd, error, sfd->user_data); @@ -6062,7 +6060,7 @@ static void _yahoo_send_file_connected(int id, int fd, int error, void *data) buff[2] = 0xc0; buff[3] = 0x80; - write(yid->fd, buff, 4); + write(yid->fd, (char*)buff, 4); /* YAHOO_CALLBACK(ext_yahoo_add_handler)(nyd->fd, YAHOO_INPUT_READ); */ diff --git a/protocols/Yahoo/src/libyahoo2/yahoo2.h b/protocols/Yahoo/src/libyahoo2/yahoo2.h index 475d82b6c3..958e83e472 100644 --- a/protocols/Yahoo/src/libyahoo2/yahoo2.h +++ b/protocols/Yahoo/src/libyahoo2/yahoo2.h @@ -183,8 +183,8 @@ void yahoo_get_url_handle(int id, const char *url, /* these should be called when input is available on a fd */
/* registered by ext_yahoo_add_handler */
/* if these return negative values, errno may be set */
-int yahoo_read_ready(int id, int fd, void *data);
-int yahoo_write_ready(int id, int fd, void *data);
+int yahoo_read_ready(int id, INT_PTR fd, void *data);
+int yahoo_write_ready(int id, INT_PTR fd, void *data);
/* utility functions. these do not hit the server */
enum yahoo_status yahoo_current_status(int id);
diff --git a/protocols/Yahoo/src/libyahoo2/yahoo2_callbacks.h b/protocols/Yahoo/src/libyahoo2/yahoo2_callbacks.h index b6a01346cb..f8d7eb1ad1 100644 --- a/protocols/Yahoo/src/libyahoo2/yahoo2_callbacks.h +++ b/protocols/Yahoo/src/libyahoo2/yahoo2_callbacks.h @@ -62,7 +62,7 @@ typedef enum { * callback_data - the callback_data passed to the ext_yahoo_connect_async
* function
*/
-typedef void (*yahoo_connect_callback)(int fd, int error, void *callback_data);
+typedef void (*yahoo_connect_callback)(INT_PTR fd, int error, void *callback_data);
/*
@@ -391,7 +391,7 @@ void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_cat_xml)(int id, const char *xml); * of yahoo_chat_member's) Must be freed by the client
* fd - the socket where the connection is coming from (for tracking)
*/
-void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_join)(int id, const char *me, const char *room, const char *topic, YList *members, int fd);
+void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_join)(int id, const char *me, const char *room, const char *topic, YList *members, INT_PTR fd);
/*
@@ -790,7 +790,7 @@ int YAHOO_CALLBACK_TYPE(ext_yahoo_log)(const char *fmt, ...); *
* Returns: a tag to be used when removing the handler
*/
-unsigned int YAHOO_CALLBACK_TYPE(ext_yahoo_add_handler)(int id, int fd, yahoo_input_condition cond, void *data);
+unsigned int YAHOO_CALLBACK_TYPE(ext_yahoo_add_handler)(int id, INT_PTR fd, yahoo_input_condition cond, void *data);
/*
diff --git a/protocols/Yahoo/src/libyahoo2/yahoo2_types.h b/protocols/Yahoo/src/libyahoo2/yahoo2_types.h index e0bcf9498c..245cc118fd 100644 --- a/protocols/Yahoo/src/libyahoo2/yahoo2_types.h +++ b/protocols/Yahoo/src/libyahoo2/yahoo2_types.h @@ -403,12 +403,12 @@ struct yahoo_found_contact { /*
* Function pointer to be passed to http get/post and send file
*/
-typedef void (*yahoo_get_fd_callback)(int id, int fd, int error, void *data);
+typedef void (*yahoo_get_fd_callback)(int id, INT_PTR fd, int error, void *data);
/*
* Function pointer to be passed to yahoo_get_url_handle
*/
-typedef void (*yahoo_get_url_handle_callback)(int id, int fd, int error,
+typedef void (*yahoo_get_url_handle_callback)(int id, INT_PTR fd, int error,
const char *filename, unsigned long size, void *data);
diff --git a/protocols/Yahoo/src/libyahoo2/yahoo_httplib.cpp b/protocols/Yahoo/src/libyahoo2/yahoo_httplib.cpp index c3543917f1..551c64fbe7 100644 --- a/protocols/Yahoo/src/libyahoo2/yahoo_httplib.cpp +++ b/protocols/Yahoo/src/libyahoo2/yahoo_httplib.cpp @@ -67,7 +67,7 @@ extern struct yahoo_callbacks *yc; extern enum yahoo_log_level log_level;
-int yahoo_tcp_readline(char *ptr, int maxlen, int fd)
+int yahoo_tcp_readline(char *ptr, int maxlen, INT_PTR fd)
{
int n, rc;
char c;
@@ -277,7 +277,7 @@ char *yahoo_xmldecode(const char *instr) return (str);
}
-typedef void (*http_connected)(int id, int fd, int error);
+typedef void (*http_connected)(int id, INT_PTR fd, int error);
struct callback_data {
int id;
@@ -286,7 +286,7 @@ struct callback_data { void *user_data;
};
-static void connect_complete(int fd, int error, void *data)
+static void connect_complete(INT_PTR fd, int error, void *data)
{
struct callback_data *ccd = (struct callback_data *) data;
@@ -376,7 +376,7 @@ struct url_data { void *user_data;
};
-static void yahoo_got_url_fd(int id, int fd, int error, void *data)
+static void yahoo_got_url_fd(int id, INT_PTR fd, int error, void *data)
{
char *tmp=NULL;
char buff[1024];
diff --git a/protocols/Yahoo/src/libyahoo2/yahoo_httplib.h b/protocols/Yahoo/src/libyahoo2/yahoo_httplib.h index 1698928928..1baea7cea8 100644 --- a/protocols/Yahoo/src/libyahoo2/yahoo_httplib.h +++ b/protocols/Yahoo/src/libyahoo2/yahoo_httplib.h @@ -32,7 +32,7 @@ char *yahoo_urlencode(const char *instr); char *yahoo_urldecode(const char *instr);
char *yahoo_xmldecode(const char *instr);
-int yahoo_tcp_readline(char *ptr, int maxlen, int fd);
+int yahoo_tcp_readline(char *ptr, int maxlen, INT_PTR fd);
void yahoo_http_post(int id, const char *url, const char *cookies, long size,
yahoo_get_fd_callback callback, void *data);
void yahoo_http_get(int id, const char *url, const char *cookies,
diff --git a/protocols/Yahoo/src/proto.h b/protocols/Yahoo/src/proto.h index 8b5616e462..1b7d1fd5c4 100644 --- a/protocols/Yahoo/src/proto.h +++ b/protocols/Yahoo/src/proto.h @@ -245,7 +245,7 @@ struct CYahooProto : public PROTO<CYahooProto> void set_status(int myyahooStatus, char *msg, int away);
void stealth(const char *buddy, int add);
- int ext_connect(const char *h, int p, int type);
+ INT_PTR ext_connect(const char *h, int p, int type);
int ext_connect_async(const char *host, int port, int type, yahoo_connect_callback callback, void *data);
void ext_send_http_request(enum yahoo_connection_type type, const char *method, const char *url, const char *cookies, long content_length, yahoo_get_fd_callback callback, void *callback_data);
diff --git a/protocols/Yahoo/src/yahoo.cpp b/protocols/Yahoo/src/yahoo.cpp index 0ac5740c41..7ecf6dc61f 100644 --- a/protocols/Yahoo/src/yahoo.cpp +++ b/protocols/Yahoo/src/yahoo.cpp @@ -1209,7 +1209,7 @@ void CYahooProto::ext_error(const char *err, int fatal, int num) extern HANDLE g_hNetlibUser;
-int CYahooProto::ext_connect(const char *h, int p, int type)
+INT_PTR CYahooProto::ext_connect(const char *h, int p, int type)
{
LOG(("[ext_connect] %s:%d type: %d", h, p, type));
@@ -1234,7 +1234,7 @@ int CYahooProto::ext_connect(const char *h, int p, int type) LOG(("[ext_connect] Got: %d", (int)con));
- return (int)con;
+ return (INT_PTR)con;
}
void CYahooProto::ext_send_http_request(enum yahoo_connection_type type, const char *method, const char *url,
@@ -1249,7 +1249,8 @@ void CYahooProto::ext_send_http_request(enum yahoo_connection_type type, const c */
NETLIBHTTPREQUEST nlhr={0};
NETLIBHTTPHEADER httpHeaders[5];
- int fd, error = 0;
+ int error = 0;
+ INT_PTR fd;
char host[255];
int port = 80, i=0;
char path[255];
@@ -1408,7 +1409,8 @@ void yahoo_callback(struct _conn *c, yahoo_input_condition cond) int CYahooProto::ext_connect_async(const char *host, int port, int type, yahoo_connect_callback callback, void *data)
{
- int err = 0, res;
+ int err = 0;
+ INT_PTR res;
LOG(("[ext_connect_async] %s:%d type: %d", host, port, type));
@@ -1604,7 +1606,7 @@ CYahooProto* __fastcall getProtoById( int id ) return NULL;
}
-unsigned int ext_yahoo_add_handler(int id, int fd, yahoo_input_condition cond, void *data)
+unsigned int ext_yahoo_add_handler(int id, INT_PTR fd, yahoo_input_condition cond, void *data)
{
CYahooProto* ppro = getProtoById( id );
if ( ppro )
diff --git a/protocols/Yahoo/src/yahoo.h b/protocols/Yahoo/src/yahoo.h index c99d1e13be..214c77fb43 100644 --- a/protocols/Yahoo/src/yahoo.h +++ b/protocols/Yahoo/src/yahoo.h @@ -88,7 +88,7 @@ extern int do_yahoo_debug; struct _conn {
unsigned int tag;
int id;
- int fd;
+ INT_PTR fd;
yahoo_input_condition cond;
void *data;
int remove;
diff --git a/src/core/stdfile/ftmanager.cpp b/src/core/stdfile/ftmanager.cpp index abd07d2b91..9788776091 100644 --- a/src/core/stdfile/ftmanager.cpp +++ b/src/core/stdfile/ftmanager.cpp @@ -162,7 +162,7 @@ static INT_PTR CALLBACK FtMgrPageDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPA if (i == dat->wnds->realCount)
PostMessage(GetParent(hwnd), WM_TIMER, 1, NULL);
- if(dat->runningCount == 0 && (int)wParam == ACKRESULT_SUCCESS && db_get_b(NULL, "SRFile", "AutoClose", 0))
+ if(dat->runningCount == 0 && wParam == ACKRESULT_SUCCESS && db_get_b(NULL, "SRFile", "AutoClose", 0))
ShowWindow(hwndFtMgr, SW_HIDE);
break;
diff --git a/src/modules/clist/clui.cpp b/src/modules/clist/clui.cpp index 7522afabf3..ee0884e97d 100644 --- a/src/modules/clist/clui.cpp +++ b/src/modules/clist/clui.cpp @@ -585,7 +585,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM }
case WM_TIMER:
- if ((int)wParam == TM_AUTOALPHA) {
+ if (wParam == TM_AUTOALPHA) {
int inwnd;
if (GetForegroundWindow() == hwnd) {
diff --git a/src/modules/extraicons/extraicons.cpp b/src/modules/extraicons/extraicons.cpp index cfd80a3697..4d0d56c4ef 100644 --- a/src/modules/extraicons/extraicons.cpp +++ b/src/modules/extraicons/extraicons.cpp @@ -351,7 +351,7 @@ INT_PTR ExtraIcon_Register(WPARAM wParam, LPARAM lParam) return 0;
EXTRAICON_INFO *ei = (EXTRAICON_INFO *)wParam;
- if (ei->cbSize < (int)sizeof(EXTRAICON_INFO))
+ if (ei->cbSize < sizeof(EXTRAICON_INFO))
return 0;
if (ei->type != EXTRAICON_TYPE_CALLBACK && ei->type != EXTRAICON_TYPE_ICOLIB)
return 0;
@@ -462,7 +462,7 @@ INT_PTR ExtraIcon_SetIcon(WPARAM wParam, LPARAM) return -1;
EXTRAICON *ei = (EXTRAICON*)wParam;
- if (ei->cbSize < (int)sizeof(EXTRAICON) || ei->hExtraIcon == NULL || ei->hContact == NULL)
+ if (ei->cbSize < sizeof(EXTRAICON) || ei->hExtraIcon == NULL || ei->hContact == NULL)
return -1;
ExtraIcon *extra = GetExtraIcon(ei->hExtraIcon);
@@ -478,7 +478,7 @@ INT_PTR ExtraIcon_SetIconByName(WPARAM wParam, LPARAM) return -1;
EXTRAICON *ei = (EXTRAICON*)wParam;
- if (ei->cbSize < (int)sizeof(EXTRAICON) || ei->hExtraIcon == NULL || ei->hContact == NULL)
+ if (ei->cbSize < sizeof(EXTRAICON) || ei->hExtraIcon == NULL || ei->hContact == NULL)
return -1;
ExtraIcon *extra = GetExtraIcon(ei->hExtraIcon);
diff --git a/src/modules/xml/xmlParser.cpp b/src/modules/xml/xmlParser.cpp index 958d54f2fc..9da791bfdf 100644 --- a/src/modules/xml/xmlParser.cpp +++ b/src/modules/xml/xmlParser.cpp @@ -159,7 +159,7 @@ char myIsTextWideChar(const void *b, int len) // inspired by the Wine API: RtlIs const wchar_t *s = (const wchar_t*)b; // buffer too small: - if (len<(int)sizeof(wchar_t)) return FALSE; + if (len<sizeof(wchar_t)) return FALSE; // odd length test if (len&1) return FALSE; @@ -3042,7 +3042,7 @@ unsigned char *XMLParserBase64Tool::decode(XMLCSTR data, int *outlen, XMLError * *outlen = len; if (!len) return NULL; - alloc(len+1); // XXX: check me! + alloc(len+1); if(!decode(data, (unsigned char*)buf, len, xe)) return NULL; return (unsigned char*)buf; |