[FFmpeg-devel] BuildRootPolicy discovered error.
Dimstar / Dominique Leuenberger
dimstar at opensuse.org
Wed Sep 28 09:40:19 CEST 2011
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?)
Best regards
Dominique
More information about the ffmpeg-devel
mailing list