[FFmpeg-devel] BuildRootPolicy discovered error.
michaelni at gmx.at
Wed Sep 28 15:21:25 CEST 2011
On Wed, Sep 28, 2011 at 09:40:19AM +0200, Dimstar / Dominique Leuenberger wrote:
> Hi all,
> Since recently my Build Root Policy Checker aborts the build of ffmpeg,
> due to this compiler warning (which by BRP is raised to an error based
> on experience of issues).
> libavcodec/j2kenc.c: In function 'put_sot':
> libavcodec/j2kenc.c:333:9: warning: return makes pointer from integer
> without a cast [enabled by default]
> And indeed, the code is rather obviously wrong there:
> static uint8_t *put_sot(J2kEncoderContext *s, int tileno)
> uint8_t *psotptr;
> if (s->buf_end - s->buf < 12)
> return -1;
> Conversion of -1 to a uint8_t* sounds very broken.
> What was the idea behind this (besides being able to identify an error?)
the author just mixed up integer & pointer error returns
fixed locally should be in master git in a few minutes
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel