mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Get rid of all the MSVC warnings.
[originally from svn r7086]
This commit is contained in:
parent
4fa9564c90
commit
42801b7e9e
6
sftp.c
6
sftp.c
@ -30,7 +30,7 @@ static void fxp_internal_error(char *msg);
|
|||||||
*/
|
*/
|
||||||
static void sftp_pkt_ensure(struct sftp_packet *pkt, int length)
|
static void sftp_pkt_ensure(struct sftp_packet *pkt, int length)
|
||||||
{
|
{
|
||||||
if (pkt->maxlen < length) {
|
if ((int)pkt->maxlen < length) {
|
||||||
pkt->maxlen = length + 256;
|
pkt->maxlen = length + 256;
|
||||||
pkt->data = sresize(pkt->data, pkt->maxlen, char);
|
pkt->data = sresize(pkt->data, pkt->maxlen, char);
|
||||||
}
|
}
|
||||||
@ -151,7 +151,7 @@ static int sftp_pkt_getstring(struct sftp_packet *pkt,
|
|||||||
return 0;
|
return 0;
|
||||||
*length = GET_32BIT(pkt->data + pkt->savedpos);
|
*length = GET_32BIT(pkt->data + pkt->savedpos);
|
||||||
pkt->savedpos += 4;
|
pkt->savedpos += 4;
|
||||||
if (pkt->length - pkt->savedpos < *length || *length < 0) {
|
if ((int)(pkt->length - pkt->savedpos) < *length || *length < 0) {
|
||||||
*length = 0;
|
*length = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -994,7 +994,7 @@ struct fxp_names *fxp_readdir_recv(struct sftp_packet *pktin,
|
|||||||
ret = snew(struct fxp_names);
|
ret = snew(struct fxp_names);
|
||||||
ret->nnames = i;
|
ret->nnames = i;
|
||||||
ret->names = snewn(ret->nnames, struct fxp_name);
|
ret->names = snewn(ret->nnames, struct fxp_name);
|
||||||
for (i = 0; i < ret->nnames; i++) {
|
for (i = 0; i < (unsigned long)ret->nnames; i++) {
|
||||||
char *str1, *str2;
|
char *str1, *str2;
|
||||||
int len1, len2;
|
int len1, len2;
|
||||||
if (!sftp_pkt_getstring(pktin, &str1, &len1) ||
|
if (!sftp_pkt_getstring(pktin, &str1, &len1) ||
|
||||||
|
9
ssh.c
9
ssh.c
@ -4641,7 +4641,7 @@ static void ssh1_msg_channel_data(Ssh ssh, struct Packet *pktin)
|
|||||||
/* Data for an agent message. Buffer it. */
|
/* Data for an agent message. Buffer it. */
|
||||||
while (len > 0) {
|
while (len > 0) {
|
||||||
if (c->u.a.lensofar < 4) {
|
if (c->u.a.lensofar < 4) {
|
||||||
unsigned int l = min(4 - c->u.a.lensofar, len);
|
unsigned int l = min(4 - c->u.a.lensofar, (unsigned)len);
|
||||||
memcpy(c->u.a.msglen + c->u.a.lensofar, p,
|
memcpy(c->u.a.msglen + c->u.a.lensofar, p,
|
||||||
l);
|
l);
|
||||||
p += l;
|
p += l;
|
||||||
@ -4658,7 +4658,7 @@ static void ssh1_msg_channel_data(Ssh ssh, struct Packet *pktin)
|
|||||||
if (c->u.a.lensofar >= 4 && len > 0) {
|
if (c->u.a.lensofar >= 4 && len > 0) {
|
||||||
unsigned int l =
|
unsigned int l =
|
||||||
min(c->u.a.totallen - c->u.a.lensofar,
|
min(c->u.a.totallen - c->u.a.lensofar,
|
||||||
len);
|
(unsigned)len);
|
||||||
memcpy(c->u.a.message + c->u.a.lensofar, p,
|
memcpy(c->u.a.message + c->u.a.lensofar, p,
|
||||||
l);
|
l);
|
||||||
p += l;
|
p += l;
|
||||||
@ -6078,7 +6078,8 @@ static void ssh2_msg_channel_data(Ssh ssh, struct Packet *pktin)
|
|||||||
case CHAN_AGENT:
|
case CHAN_AGENT:
|
||||||
while (length > 0) {
|
while (length > 0) {
|
||||||
if (c->u.a.lensofar < 4) {
|
if (c->u.a.lensofar < 4) {
|
||||||
unsigned int l = min(4 - c->u.a.lensofar, length);
|
unsigned int l = min(4 - c->u.a.lensofar,
|
||||||
|
(unsigned)length);
|
||||||
memcpy(c->u.a.msglen + c->u.a.lensofar,
|
memcpy(c->u.a.msglen + c->u.a.lensofar,
|
||||||
data, l);
|
data, l);
|
||||||
data += l;
|
data += l;
|
||||||
@ -6095,7 +6096,7 @@ static void ssh2_msg_channel_data(Ssh ssh, struct Packet *pktin)
|
|||||||
if (c->u.a.lensofar >= 4 && length > 0) {
|
if (c->u.a.lensofar >= 4 && length > 0) {
|
||||||
unsigned int l =
|
unsigned int l =
|
||||||
min(c->u.a.totallen - c->u.a.lensofar,
|
min(c->u.a.totallen - c->u.a.lensofar,
|
||||||
length);
|
(unsigned)length);
|
||||||
memcpy(c->u.a.message + c->u.a.lensofar,
|
memcpy(c->u.a.message + c->u.a.lensofar,
|
||||||
data, l);
|
data, l);
|
||||||
data += l;
|
data += l;
|
||||||
|
@ -19,7 +19,7 @@ static void arcfour_block(void *handle, unsigned char *blk, int len)
|
|||||||
|
|
||||||
s = ctx->s;
|
s = ctx->s;
|
||||||
i = ctx->i; j = ctx->j;
|
i = ctx->i; j = ctx->j;
|
||||||
for (k = 0; k < len; k++) {
|
for (k = 0; (int)k < len; k++) {
|
||||||
i = (i + 1) & 0xff;
|
i = (i + 1) & 0xff;
|
||||||
j = (j + s[i]) & 0xff;
|
j = (j + s[i]) & 0xff;
|
||||||
tmp = s[i]; s[i] = s[j]; s[j] = tmp;
|
tmp = s[i]; s[i] = s[j]; s[j] = tmp;
|
||||||
|
54
sshbn.c
54
sshbn.c
@ -256,7 +256,7 @@ static void internal_mod(BignumInt *a, int alen,
|
|||||||
for (k = mlen - 1; k >= 0; k--) {
|
for (k = mlen - 1; k >= 0; k--) {
|
||||||
t = MUL_WORD(q, m[k]);
|
t = MUL_WORD(q, m[k]);
|
||||||
t += c;
|
t += c;
|
||||||
c = t >> BIGNUM_INT_BITS;
|
c = (unsigned)(t >> BIGNUM_INT_BITS);
|
||||||
if ((BignumInt) t > a[i + k])
|
if ((BignumInt) t > a[i + k])
|
||||||
c++;
|
c++;
|
||||||
a[i + k] -= (BignumInt) t;
|
a[i + k] -= (BignumInt) t;
|
||||||
@ -322,7 +322,7 @@ Bignum modpow(Bignum base_in, Bignum exp, Bignum mod)
|
|||||||
i = mlen - base[0];
|
i = mlen - base[0];
|
||||||
for (j = 0; j < i; j++)
|
for (j = 0; j < i; j++)
|
||||||
n[j] = 0;
|
n[j] = 0;
|
||||||
for (j = 0; j < base[0]; j++)
|
for (j = 0; j < (int)base[0]; j++)
|
||||||
n[i + j] = base[base[0] - j];
|
n[i + j] = base[base[0] - j];
|
||||||
|
|
||||||
/* Allocate a and b of size 2*mlen. Set a = 1 */
|
/* Allocate a and b of size 2*mlen. Set a = 1 */
|
||||||
@ -335,7 +335,7 @@ Bignum modpow(Bignum base_in, Bignum exp, Bignum mod)
|
|||||||
/* Skip leading zero bits of exp. */
|
/* Skip leading zero bits of exp. */
|
||||||
i = 0;
|
i = 0;
|
||||||
j = BIGNUM_INT_BITS-1;
|
j = BIGNUM_INT_BITS-1;
|
||||||
while (i < exp[0] && (exp[exp[0] - i] & (1 << j)) == 0) {
|
while (i < (int)exp[0] && (exp[exp[0] - i] & (1 << j)) == 0) {
|
||||||
j--;
|
j--;
|
||||||
if (j < 0) {
|
if (j < 0) {
|
||||||
i++;
|
i++;
|
||||||
@ -344,7 +344,7 @@ Bignum modpow(Bignum base_in, Bignum exp, Bignum mod)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Main computation */
|
/* Main computation */
|
||||||
while (i < exp[0]) {
|
while (i < (int)exp[0]) {
|
||||||
while (j >= 0) {
|
while (j >= 0) {
|
||||||
internal_mul(a + mlen, a + mlen, b, mlen);
|
internal_mul(a + mlen, a + mlen, b, mlen);
|
||||||
internal_mod(b, mlen * 2, m, mlen, NULL, 0);
|
internal_mod(b, mlen * 2, m, mlen, NULL, 0);
|
||||||
@ -435,7 +435,7 @@ Bignum modmul(Bignum p, Bignum q, Bignum mod)
|
|||||||
i = pqlen - p[0];
|
i = pqlen - p[0];
|
||||||
for (j = 0; j < i; j++)
|
for (j = 0; j < i; j++)
|
||||||
n[j] = 0;
|
n[j] = 0;
|
||||||
for (j = 0; j < p[0]; j++)
|
for (j = 0; j < (int)p[0]; j++)
|
||||||
n[i + j] = p[p[0] - j];
|
n[i + j] = p[p[0] - j];
|
||||||
|
|
||||||
/* Allocate o of size pqlen, copy q to o */
|
/* Allocate o of size pqlen, copy q to o */
|
||||||
@ -443,7 +443,7 @@ Bignum modmul(Bignum p, Bignum q, Bignum mod)
|
|||||||
i = pqlen - q[0];
|
i = pqlen - q[0];
|
||||||
for (j = 0; j < i; j++)
|
for (j = 0; j < i; j++)
|
||||||
o[j] = 0;
|
o[j] = 0;
|
||||||
for (j = 0; j < q[0]; j++)
|
for (j = 0; j < (int)q[0]; j++)
|
||||||
o[i + j] = q[q[0] - j];
|
o[i + j] = q[q[0] - j];
|
||||||
|
|
||||||
/* Allocate a of size 2*pqlen for result */
|
/* Allocate a of size 2*pqlen for result */
|
||||||
@ -527,7 +527,7 @@ static void bigdivmod(Bignum p, Bignum mod, Bignum result, Bignum quotient)
|
|||||||
n = snewn(plen, BignumInt);
|
n = snewn(plen, BignumInt);
|
||||||
for (j = 0; j < plen; j++)
|
for (j = 0; j < plen; j++)
|
||||||
n[j] = 0;
|
n[j] = 0;
|
||||||
for (j = 1; j <= p[0]; j++)
|
for (j = 1; j <= (int)p[0]; j++)
|
||||||
n[plen - j] = p[j];
|
n[plen - j] = p[j];
|
||||||
|
|
||||||
/* Main computation */
|
/* Main computation */
|
||||||
@ -545,7 +545,7 @@ static void bigdivmod(Bignum p, Bignum mod, Bignum result, Bignum quotient)
|
|||||||
|
|
||||||
/* Copy result to buffer */
|
/* Copy result to buffer */
|
||||||
if (result) {
|
if (result) {
|
||||||
for (i = 1; i <= result[0]; i++) {
|
for (i = 1; i <= (int)result[0]; i++) {
|
||||||
int j = plen - i;
|
int j = plen - i;
|
||||||
result[i] = j >= 0 ? n[j] : 0;
|
result[i] = j >= 0 ? n[j] : 0;
|
||||||
}
|
}
|
||||||
@ -566,7 +566,7 @@ static void bigdivmod(Bignum p, Bignum mod, Bignum result, Bignum quotient)
|
|||||||
void decbn(Bignum bn)
|
void decbn(Bignum bn)
|
||||||
{
|
{
|
||||||
int i = 1;
|
int i = 1;
|
||||||
while (i < bn[0] && bn[i] == 0)
|
while (i < (int)bn[0] && bn[i] == 0)
|
||||||
bn[i++] = BIGNUM_INT_MASK;
|
bn[i++] = BIGNUM_INT_MASK;
|
||||||
bn[i]--;
|
bn[i]--;
|
||||||
}
|
}
|
||||||
@ -652,7 +652,7 @@ int ssh2_bignum_length(Bignum bn)
|
|||||||
*/
|
*/
|
||||||
int bignum_byte(Bignum bn, int i)
|
int bignum_byte(Bignum bn, int i)
|
||||||
{
|
{
|
||||||
if (i >= BIGNUM_INT_BYTES * bn[0])
|
if (i >= (int)(BIGNUM_INT_BYTES * bn[0]))
|
||||||
return 0; /* beyond the end */
|
return 0; /* beyond the end */
|
||||||
else
|
else
|
||||||
return (bn[i / BIGNUM_INT_BYTES + 1] >>
|
return (bn[i / BIGNUM_INT_BYTES + 1] >>
|
||||||
@ -664,7 +664,7 @@ int bignum_byte(Bignum bn, int i)
|
|||||||
*/
|
*/
|
||||||
int bignum_bit(Bignum bn, int i)
|
int bignum_bit(Bignum bn, int i)
|
||||||
{
|
{
|
||||||
if (i >= BIGNUM_INT_BITS * bn[0])
|
if (i >= (int)(BIGNUM_INT_BITS * bn[0]))
|
||||||
return 0; /* beyond the end */
|
return 0; /* beyond the end */
|
||||||
else
|
else
|
||||||
return (bn[i / BIGNUM_INT_BITS + 1] >> (i % BIGNUM_INT_BITS)) & 1;
|
return (bn[i / BIGNUM_INT_BITS + 1] >> (i % BIGNUM_INT_BITS)) & 1;
|
||||||
@ -675,7 +675,7 @@ int bignum_bit(Bignum bn, int i)
|
|||||||
*/
|
*/
|
||||||
void bignum_set_bit(Bignum bn, int bitnum, int value)
|
void bignum_set_bit(Bignum bn, int bitnum, int value)
|
||||||
{
|
{
|
||||||
if (bitnum >= BIGNUM_INT_BITS * bn[0])
|
if (bitnum >= (int)(BIGNUM_INT_BITS * bn[0]))
|
||||||
abort(); /* beyond the end */
|
abort(); /* beyond the end */
|
||||||
else {
|
else {
|
||||||
int v = bitnum / BIGNUM_INT_BITS + 1;
|
int v = bitnum / BIGNUM_INT_BITS + 1;
|
||||||
@ -742,9 +742,9 @@ Bignum bignum_rshift(Bignum a, int shift)
|
|||||||
shiftbb = BIGNUM_INT_BITS - shiftb;
|
shiftbb = BIGNUM_INT_BITS - shiftb;
|
||||||
|
|
||||||
ai1 = a[shiftw + 1];
|
ai1 = a[shiftw + 1];
|
||||||
for (i = 1; i <= ret[0]; i++) {
|
for (i = 1; i <= (int)ret[0]; i++) {
|
||||||
ai = ai1;
|
ai = ai1;
|
||||||
ai1 = (i + shiftw + 1 <= a[0] ? a[i + shiftw + 1] : 0);
|
ai1 = (i + shiftw + 1 <= (int)a[0] ? a[i + shiftw + 1] : 0);
|
||||||
ret[i] = ((ai >> shiftb) | (ai1 << shiftbb)) & BIGNUM_INT_MASK;
|
ret[i] = ((ai >> shiftb) | (ai1 << shiftbb)) & BIGNUM_INT_MASK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -766,8 +766,8 @@ Bignum bigmuladd(Bignum a, Bignum b, Bignum addend)
|
|||||||
/* mlen space for a, mlen space for b, 2*mlen for result */
|
/* mlen space for a, mlen space for b, 2*mlen for result */
|
||||||
workspace = snewn(mlen * 4, BignumInt);
|
workspace = snewn(mlen * 4, BignumInt);
|
||||||
for (i = 0; i < mlen; i++) {
|
for (i = 0; i < mlen; i++) {
|
||||||
workspace[0 * mlen + i] = (mlen - i <= a[0] ? a[mlen - i] : 0);
|
workspace[0 * mlen + i] = (mlen - i <= (int)a[0] ? a[mlen - i] : 0);
|
||||||
workspace[1 * mlen + i] = (mlen - i <= b[0] ? b[mlen - i] : 0);
|
workspace[1 * mlen + i] = (mlen - i <= (int)b[0] ? b[mlen - i] : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal_mul(workspace + 0 * mlen, workspace + 1 * mlen,
|
internal_mul(workspace + 0 * mlen, workspace + 1 * mlen,
|
||||||
@ -775,11 +775,11 @@ Bignum bigmuladd(Bignum a, Bignum b, Bignum addend)
|
|||||||
|
|
||||||
/* now just copy the result back */
|
/* now just copy the result back */
|
||||||
rlen = alen + blen + 1;
|
rlen = alen + blen + 1;
|
||||||
if (addend && rlen <= addend[0])
|
if (addend && rlen <= (int)addend[0])
|
||||||
rlen = addend[0] + 1;
|
rlen = addend[0] + 1;
|
||||||
ret = newbn(rlen);
|
ret = newbn(rlen);
|
||||||
maxspot = 0;
|
maxspot = 0;
|
||||||
for (i = 1; i <= ret[0]; i++) {
|
for (i = 1; i <= (int)ret[0]; i++) {
|
||||||
ret[i] = (i <= 2 * mlen ? workspace[4 * mlen - i] : 0);
|
ret[i] = (i <= 2 * mlen ? workspace[4 * mlen - i] : 0);
|
||||||
if (ret[i] != 0)
|
if (ret[i] != 0)
|
||||||
maxspot = i;
|
maxspot = i;
|
||||||
@ -790,8 +790,8 @@ Bignum bigmuladd(Bignum a, Bignum b, Bignum addend)
|
|||||||
if (addend) {
|
if (addend) {
|
||||||
BignumDblInt carry = 0;
|
BignumDblInt carry = 0;
|
||||||
for (i = 1; i <= rlen; i++) {
|
for (i = 1; i <= rlen; i++) {
|
||||||
carry += (i <= ret[0] ? ret[i] : 0);
|
carry += (i <= (int)ret[0] ? ret[i] : 0);
|
||||||
carry += (i <= addend[0] ? addend[i] : 0);
|
carry += (i <= (int)addend[0] ? addend[i] : 0);
|
||||||
ret[i] = (BignumInt) carry & BIGNUM_INT_MASK;
|
ret[i] = (BignumInt) carry & BIGNUM_INT_MASK;
|
||||||
carry >>= BIGNUM_INT_BITS;
|
carry >>= BIGNUM_INT_BITS;
|
||||||
if (ret[i] != 0 && i > maxspot)
|
if (ret[i] != 0 && i > maxspot)
|
||||||
@ -862,9 +862,9 @@ Bignum bignum_add_long(Bignum number, unsigned long addendx)
|
|||||||
int i, maxspot = 0;
|
int i, maxspot = 0;
|
||||||
BignumDblInt carry = 0, addend = addendx;
|
BignumDblInt carry = 0, addend = addendx;
|
||||||
|
|
||||||
for (i = 1; i <= ret[0]; i++) {
|
for (i = 1; i <= (int)ret[0]; i++) {
|
||||||
carry += addend & BIGNUM_INT_MASK;
|
carry += addend & BIGNUM_INT_MASK;
|
||||||
carry += (i <= number[0] ? number[i] : 0);
|
carry += (i <= (int)number[0] ? number[i] : 0);
|
||||||
addend >>= BIGNUM_INT_BITS;
|
addend >>= BIGNUM_INT_BITS;
|
||||||
ret[i] = (BignumInt) carry & BIGNUM_INT_MASK;
|
ret[i] = (BignumInt) carry & BIGNUM_INT_MASK;
|
||||||
carry >>= BIGNUM_INT_BITS;
|
carry >>= BIGNUM_INT_BITS;
|
||||||
@ -995,9 +995,9 @@ Bignum modinv(Bignum number, Bignum modulus)
|
|||||||
int maxspot = 1;
|
int maxspot = 1;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 1; i <= newx[0]; i++) {
|
for (i = 1; i <= (int)newx[0]; i++) {
|
||||||
BignumInt aword = (i <= modulus[0] ? modulus[i] : 0);
|
BignumInt aword = (i <= (int)modulus[0] ? modulus[i] : 0);
|
||||||
BignumInt bword = (i <= x[0] ? x[i] : 0);
|
BignumInt bword = (i <= (int)x[0] ? x[i] : 0);
|
||||||
newx[i] = aword - bword - carry;
|
newx[i] = aword - bword - carry;
|
||||||
bword = ~bword;
|
bword = ~bword;
|
||||||
carry = carry ? (newx[i] >= bword) : (newx[i] > bword);
|
carry = carry ? (newx[i] >= bword) : (newx[i] > bword);
|
||||||
@ -1054,7 +1054,7 @@ char *bignum_decimal(Bignum x)
|
|||||||
* big-endian form of the number.
|
* big-endian form of the number.
|
||||||
*/
|
*/
|
||||||
workspace = snewn(x[0], BignumInt);
|
workspace = snewn(x[0], BignumInt);
|
||||||
for (i = 0; i < x[0]; i++)
|
for (i = 0; i < (int)x[0]; i++)
|
||||||
workspace[i] = x[x[0] - i];
|
workspace[i] = x[x[0] - i];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1067,7 +1067,7 @@ char *bignum_decimal(Bignum x)
|
|||||||
do {
|
do {
|
||||||
iszero = 1;
|
iszero = 1;
|
||||||
carry = 0;
|
carry = 0;
|
||||||
for (i = 0; i < x[0]; i++) {
|
for (i = 0; i < (int)x[0]; i++) {
|
||||||
carry = (carry << BIGNUM_INT_BITS) + workspace[i];
|
carry = (carry << BIGNUM_INT_BITS) + workspace[i];
|
||||||
workspace[i] = (BignumInt) (carry / 10);
|
workspace[i] = (BignumInt) (carry / 10);
|
||||||
if (workspace[i])
|
if (workspace[i])
|
||||||
|
@ -6441,7 +6441,7 @@ int term_get_userpass_input(Terminal *term, prompts_t *p,
|
|||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < p->n_prompts; i++)
|
for (i = 0; i < (int)p->n_prompts; i++)
|
||||||
memset(p->prompts[i]->result, 0, p->prompts[i]->result_len);
|
memset(p->prompts[i]->result, 0, p->prompts[i]->result_len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -314,7 +314,7 @@ int console_get_userpass_input(prompts_t *p, unsigned char *in, int inlen)
|
|||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < p->n_prompts; i++)
|
for (i = 0; i < (int)p->n_prompts; i++)
|
||||||
memset(p->prompts[i]->result, 0, p->prompts[i]->result_len);
|
memset(p->prompts[i]->result, 0, p->prompts[i]->result_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2011,7 +2011,6 @@ int winctrl_context_help(struct dlgparam *dp, HWND hwnd, int id)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct winctrl *c;
|
struct winctrl *c;
|
||||||
char *cmd;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Look up the control ID in our data.
|
* Look up the control ID in our data.
|
||||||
|
@ -969,7 +969,7 @@ void update_specials_menu(void *frontend)
|
|||||||
for (j = 0; j < lenof(popup_menus); j++) {
|
for (j = 0; j < lenof(popup_menus); j++) {
|
||||||
if (specials_menu) {
|
if (specials_menu) {
|
||||||
/* XXX does this free up all submenus? */
|
/* XXX does this free up all submenus? */
|
||||||
DeleteMenu(popup_menus[j].menu, specials_menu, MF_BYCOMMAND);
|
DeleteMenu(popup_menus[j].menu, (UINT)specials_menu, MF_BYCOMMAND);
|
||||||
DeleteMenu(popup_menus[j].menu, IDM_SPECIALSEP, MF_BYCOMMAND);
|
DeleteMenu(popup_menus[j].menu, IDM_SPECIALSEP, MF_BYCOMMAND);
|
||||||
}
|
}
|
||||||
if (new_menu) {
|
if (new_menu) {
|
||||||
@ -1270,12 +1270,12 @@ debug(("\n"));
|
|||||||
|
|
||||||
xp = xn = x;
|
xp = xn = x;
|
||||||
|
|
||||||
for (i = 0; i < cbCount ;) {
|
for (i = 0; i < (int)cbCount ;) {
|
||||||
int rtl = is_rtl(lpString[i]);
|
int rtl = is_rtl(lpString[i]);
|
||||||
|
|
||||||
xn += lpDx[i];
|
xn += lpDx[i];
|
||||||
|
|
||||||
for (j = i+1; j < cbCount; j++) {
|
for (j = i+1; j < (int)cbCount; j++) {
|
||||||
if (rtl != is_rtl(lpString[j]))
|
if (rtl != is_rtl(lpString[j]))
|
||||||
break;
|
break;
|
||||||
xn += lpDx[j];
|
xn += lpDx[j];
|
||||||
@ -2051,7 +2051,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
|
|||||||
} else if (wParam == IDM_SAVEDSESS) {
|
} else if (wParam == IDM_SAVEDSESS) {
|
||||||
unsigned int sessno = ((lParam - IDM_SAVED_MIN)
|
unsigned int sessno = ((lParam - IDM_SAVED_MIN)
|
||||||
/ MENU_SAVED_STEP) + 1;
|
/ MENU_SAVED_STEP) + 1;
|
||||||
if (sessno < sesslist.nsessions) {
|
if (sessno < (unsigned)sesslist.nsessions) {
|
||||||
char *session = sesslist.sessions[sessno];
|
char *session = sesslist.sessions[sessno];
|
||||||
/* XXX spaces? quotes? "-load"? */
|
/* XXX spaces? quotes? "-load"? */
|
||||||
cl = dupprintf("putty @%s", session);
|
cl = dupprintf("putty @%s", session);
|
||||||
|
2
x11fwd.c
2
x11fwd.c
@ -485,7 +485,7 @@ int x11_send(Socket s, char *data, int len)
|
|||||||
char realauthdata[64];
|
char realauthdata[64];
|
||||||
int realauthlen = 0;
|
int realauthlen = 0;
|
||||||
int authstrlen = strlen(x11_authnames[pr->auth->realproto]);
|
int authstrlen = strlen(x11_authnames[pr->auth->realproto]);
|
||||||
int buflen;
|
int buflen = 0; /* initialise to placate optimiser */
|
||||||
static const char zeroes[4] = { 0,0,0,0 };
|
static const char zeroes[4] = { 0,0,0,0 };
|
||||||
void *buf;
|
void *buf;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user