[FFmpeg-devel] [PATCH] Use more appropriate types when decoding vorbisfloats
Rafaël Carré
rafael.carre
Mon Jul 26 11:33:37 CEST 2010
On Sun, 25 Jul 2010 16:02:31 +0200
Michael Niedermayer <michaelni at gmx.at> wrote:
> On Sun, Jul 25, 2010 at 03:09:14PM +0200, Rafa?l Carr? wrote:
> > diff --git a/tools/patcheck b/tools/patcheck
> > index de20500..cae25ab 100755
> > --- a/tools/patcheck
> > +++ b/tools/patcheck
> > @@ -97,6 +97,7 @@ hiegrep ':\+[^}#]*else' 'missing } prior to else'
> > $* #FIXME this should print the previous statement maybe
> > hiegrep ':\+ *{ *$' '{ should be on the same line as the related
> > previous statement' $*
> > +hiegrep 'int.*[^0-9a-zA-Z_][0-9]+[Uu]?[Ll]?[Ll][^0-9a-zA-Z_]'
> > 'possibly mixing int variable and long constant' $*
>
> why int?
i'm trying to match use of (unsigned) (long) long constants in
expression involving int, such as:
int i = 1L;
int j = i * 345UL;
random_type k = (int)var & 0x12345LL;
long internal_buffer = 1L; // false positive
> and LL is not wrong, it can be needed in expressions
if it's true 'L' or 'UL' can be needed in expressions too
The use of long constants i described above might be:
- legal, according to the definition 34.b of the chapter 57.312.23.A,
described by the figure 73 at page 32 of standard XY3293, superseded
by revision 230392.423 of the aforementioned document, available
from an expensive online store or from your preferred warez boards.
- not causing any undesired side effects except moderate headaches after
reading said document
Well I don't know, i don't want to read this stuff anyway,
"int i = 1L" looks just as wrong as "int i = 1ULL"
Were you thinking of detecting the same thing?
--
? Rafa?l Carr? ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100726/96994fe3/attachment.pgp>
More information about the ffmpeg-devel
mailing list