dtls: Fix some compiler warnings

gstdtlsconnection.c:128:32: error: passing 'const char [30]' to parameter of type 'void *'
      discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
      SSL_get_ex_new_index (0, "gstdtlsagent connection index", NULL, NULL,
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/ssl.h:1981:43: note: passing argument to parameter 'argp' here
int SSL_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
                                          ^
gstdtlsconnection.c:822:40: error: arithmetic on a pointer to void is a GNU extension
      [-Werror,-Wpointer-arith]
  memcpy (out_buffer, priv->bio_buffer + priv->bio_buffer_offset, copy_size);
                      ~~~~~~~~~~~~~~~~ ^
This commit is contained in:
Sebastian Dröge 2015-03-16 17:35:29 +01:00
parent 6183e99eec
commit 1de51fcf02

View file

@ -125,8 +125,8 @@ er_dtls_connection_class_init (ErDtlsConnectionClass * klass)
gobject_class->set_property = er_dtls_connection_set_property;
connection_ex_index =
SSL_get_ex_new_index (0, "gstdtlsagent connection index", NULL, NULL,
NULL);
SSL_get_ex_new_index (0, (gpointer) "gstdtlsagent connection index", NULL,
NULL, NULL);
signals[SIGNAL_ON_DECODER_KEY] =
g_signal_new ("on-decoder-key", G_TYPE_FROM_CLASS (klass),
@ -819,7 +819,8 @@ bio_method_read (BIO * bio, char *out_buffer, int size)
"reading %d/%d bytes %d at offset %d, output buff size is %d", copy_size,
priv->bio_buffer_len, internal_size, priv->bio_buffer_offset, size);
memcpy (out_buffer, priv->bio_buffer + priv->bio_buffer_offset, copy_size);
memcpy (out_buffer, (guint8 *) priv->bio_buffer + priv->bio_buffer_offset,
copy_size);
priv->bio_buffer_offset += copy_size;
if (priv->bio_buffer_len == priv->bio_buffer_offset) {