[FFmpeg-devel] BuildRootPolicy discovered error.

Michael Niedermayer 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
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110928/7d4a6802/attachment.asc>


More information about the ffmpeg-devel mailing list