25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

* src/tls/tls_drv.c: Fixed gcc signedness warnings

* src/ejabberd_zlib/ejabberd_zlib_drv.c: Likewise

SVN Revision: 1287
This commit is contained in:
Alexey Shchepin 2008-04-11 05:20:08 +00:00
parent bd884274c0
commit 8b690c9f9f
3 changed files with 8 additions and 5 deletions

View File

@ -1,5 +1,8 @@
2008-04-11 Alexey Shchepin <alexey@process-one.net> 2008-04-11 Alexey Shchepin <alexey@process-one.net>
* src/tls/tls_drv.c: Fixed gcc signedness warnings
* src/ejabberd_zlib/ejabberd_zlib_drv.c: Likewise
* src/expat_erl.c: Removed R9B workaround * src/expat_erl.c: Removed R9B workaround
2008-04-10 Christophe Romain <christophe.romain@process-one.net> 2008-04-10 Christophe Romain <christophe.romain@process-one.net>

View File

@ -107,14 +107,14 @@ static int ejabberd_zlib_drv_control(ErlDrvData handle,
b = driver_alloc_binary(size); b = driver_alloc_binary(size);
b->orig_bytes[0] = 0; b->orig_bytes[0] = 0;
d->d_stream->next_in = buf; d->d_stream->next_in = (unsigned char *)buf;
d->d_stream->avail_in = len; d->d_stream->avail_in = len;
d->d_stream->avail_out = 0; d->d_stream->avail_out = 0;
err = Z_OK; err = Z_OK;
while (err == Z_OK && d->d_stream->avail_out == 0) while (err == Z_OK && d->d_stream->avail_out == 0)
{ {
d->d_stream->next_out = b->orig_bytes + rlen; d->d_stream->next_out = (unsigned char *)b->orig_bytes + rlen;
d->d_stream->avail_out = BUF_SIZE; d->d_stream->avail_out = BUF_SIZE;
err = deflate(d->d_stream, Z_SYNC_FLUSH); err = deflate(d->d_stream, Z_SYNC_FLUSH);
@ -135,14 +135,14 @@ static int ejabberd_zlib_drv_control(ErlDrvData handle,
b->orig_bytes[0] = 0; b->orig_bytes[0] = 0;
if (len > 0) { if (len > 0) {
d->i_stream->next_in = buf; d->i_stream->next_in = (unsigned char *)buf;
d->i_stream->avail_in = len; d->i_stream->avail_in = len;
d->i_stream->avail_out = 0; d->i_stream->avail_out = 0;
err = Z_OK; err = Z_OK;
while (err == Z_OK && d->i_stream->avail_out == 0) while (err == Z_OK && d->i_stream->avail_out == 0)
{ {
d->i_stream->next_out = b->orig_bytes + rlen; d->i_stream->next_out = (unsigned char *)b->orig_bytes + rlen;
d->i_stream->avail_out = BUF_SIZE; d->i_stream->avail_out = BUF_SIZE;
err = inflate(d->i_stream, Z_SYNC_FLUSH); err = inflate(d->i_stream, Z_SYNC_FLUSH);

View File

@ -250,7 +250,7 @@ static int tls_drv_control(ErlDrvData handle,
rlen++; rlen++;
b = driver_alloc_binary(rlen); b = driver_alloc_binary(rlen);
b->orig_bytes[0] = 0; b->orig_bytes[0] = 0;
tmp_buf = &b->orig_bytes[1]; tmp_buf = (unsigned char *)&b->orig_bytes[1];
i2d_X509(cert, &tmp_buf); i2d_X509(cert, &tmp_buf);
X509_free(cert); X509_free(cert);
*rbuf = (char *)b; *rbuf = (char *)b;