summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2014-11-30 00:53:10 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2014-11-30 00:53:10 +0000
commitce2af47d41cc790df1b18d9e80295a38747de19f (patch)
treeb9e75709ec7e75dada1c77a3ea70f1304091cae9 /plugins
parenta5574d24bc8c0e94c8880c75f0fd27d08d30b98b (diff)
code cleanup, x64 fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@11163 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Clist_nicer/src/clui.cpp2
-rw-r--r--plugins/FTPFileYM/curl/lib/netrc.c2
-rw-r--r--plugins/FTPFileYM/curl/lib/security.c2
-rw-r--r--plugins/FTPFileYM/curl/lib/ssluse.c2
-rw-r--r--plugins/FTPFileYM/curl/lib/telnet.c2
-rw-r--r--plugins/FavContacts/src/http_api.cpp2
-rw-r--r--plugins/MirOTR/MirOTR/src/svcs_srmm.cpp4
-rw-r--r--plugins/MirOTR/libgcrypt-1.4.6/random/rndw32.c2
-rw-r--r--plugins/NoHistory/src/dllmain.cpp2
-rw-r--r--plugins/Spamotron/src/sqlite3/sqlite3.c14
-rw-r--r--plugins/TabSRMM/src/container.cpp2
-rw-r--r--plugins/WinterSpeak/src/SpeakAnnounce.cpp2
-rw-r--r--plugins/Zlib/src/zlib.h10
-rw-r--r--plugins/Zlib/src/zutil.c8
14 files changed, 28 insertions, 28 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;