Closed Jesin closed 5 years ago
Hi,
Thank you for the pull request! Before merging I will look if there is a way to fix the issue without casting const away
Which compiler gives the warning? Thank you :)
Maybe casting to const void* fixes it?
Which compiler gives the warning?
IIRC, gcc did that for my case.
Maybe casting to const void* fixes it?
Why do you even need the casting? The PR suggests removing the cast, not adding it, and it is correct (I've been using that change for quite some time in my projects.)
You are absolutely correct sir :) Somehow I saw the change in the opposite direction!
I will verify why the cast was needed before (may have been a different compiler) and will gladly remove it or change to const void*.
Finally got around to check this properly. Looks like the cast was there from the very beginning, so no good reason for it to be there, so can accept the request. Thanks for the fix :)
buffer
is already declared asconst unsigned char*
, which can be transparently accepted byfwrite()
. Casting it tochar*
here just makes compilers complain about "discarding cv-qualifiers", so this commit removes that cast.