[FFmpeg-devel] [PATCH 1/4] lavf/tls_openssl: silence warning on OpenSSL 1.1 and later

Nicolas George george at nsup.org
Thu Jan 17 11:32:03 EET 2019


Rodger Combs (12019-01-17):
> CRYPTO_get_locking_callback is a macro returning NULL on 1.1 and
> later. This triggers -Wtautological-pointer-compare ("comparison of
> function 'openssl_lock' equal to a null pointer is always false"),
> which suggests "prefix with the address-of operator to silence this
> warning", so I did that. We could alternately wrap this code in an
> OpenSSL version check, but this seemed easier.

Urgh. Somebody is to blame for that ugliness, but certainly not you. If
it gets in, I suggest you add a comment to explain that.

But this is worrying: elsewhere in the code,
CRYPTO_get_locking_callback() is tested and an array is mallocated if it
is null: that looks like a leak.

I think part of that code needs to be changed to test the array itself
instead of the callbacks.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190117/c4109213/attachment.sig>


More information about the ffmpeg-devel mailing list