summaryrefslogtreecommitdiffstats
path: root/ssl/s3_pkt.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2007-09-07 13:03:25 +0000
committerDr. Stephen Henson <steve@openssl.org>2007-09-07 13:03:25 +0000
commit8164032a2e34ac236775cfcf6301d7c74534bbe4 (patch)
treebde539d596a8ab27617169a9b3cd9f30dcba201d /ssl/s3_pkt.c
parenta5804a750b3901196d4440e1b809a1236beef317 (diff)
Fix warnings: computed value not use, incompatible pointer initialization
and cast from pointer to int of different size (linux-x86_64 and align).
Diffstat (limited to 'ssl/s3_pkt.c')
-rw-r--r--ssl/s3_pkt.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c
index 06b4412918..3e5ce0c5b9 100644
--- a/ssl/s3_pkt.c
+++ b/ssl/s3_pkt.c
@@ -129,7 +129,8 @@ int ssl3_read_n(SSL *s, int n, int max, int extend)
* (If s->read_ahead is set, 'max' bytes may be stored in rbuf
* [plus s->packet_length bytes if extend == 1].)
*/
- int i,len,left,align=0;
+ int i,len,left;
+ long align=0;
unsigned char *pkt;
SSL3_BUFFER *rb;
@@ -138,7 +139,7 @@ int ssl3_read_n(SSL *s, int n, int max, int extend)
rb = &(s->s3->rbuf);
left = rb->left;
#if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD!=0
- align = (int)rb->buf + SSL3_RT_HEADER_LENGTH;
+ align = (long)rb->buf + SSL3_RT_HEADER_LENGTH;
align = (-align)&(SSL3_ALIGN_PAYLOAD-1);
#endif
@@ -602,7 +603,8 @@ static int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
{
unsigned char *p,*plen;
int i,mac_size,clear=0;
- int prefix_len=0,align=0;
+ int prefix_len=0;
+ long align=0;
SSL3_RECORD *wr;
SSL3_BUFFER *wb=&(s->s3->wbuf);
SSL_SESSION *sess;
@@ -672,7 +674,7 @@ static int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
* which would be multiple of SSL3_ALIGN_PAYLOAD, so
* if we want to align the real payload, then we can
* just pretent we simply have two headers. */
- align = (int)wb->buf + 2*SSL3_RT_HEADER_LENGTH;
+ align = (long)wb->buf + 2*SSL3_RT_HEADER_LENGTH;
align = (-align)&(SSL3_ALIGN_PAYLOAD-1);
#endif
p = wb->buf + align;
@@ -685,7 +687,7 @@ static int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
else
{
#if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD!=0
- align = (int)wb->buf + SSL3_RT_HEADER_LENGTH;
+ align = (long)wb->buf + SSL3_RT_HEADER_LENGTH;
align = (-align)&(SSL3_ALIGN_PAYLOAD-1);
#endif
p = wb->buf + align;