[dvblast-devel] Compile failure on x86_64
Alexei Takaseev
alexei at taf.ru
Tue Oct 2 17:14:32 CEST 2012
----- Исходное сообщение -----
> От: "Georgi Chorbadzhiyski" <gf at unixsol.org>
> Кому: "Mailing list for DVBlast developers" <dvblast-devel at videolan.org>
> Копия: "Alexei Takaseev" <alexei at taf.ru>
> Отправленные: Вторник, 2 Октябрь 2012 г 23:50:00
> Тема: Re: [dvblast-devel] Compile failure on x86_64
>
> >
> > I'm sorry, due to an error in the spec-file compilation is done
> > without changes in en50221.c.
> >
> > Successful compilation of such revisions occurred when:
> >
> > commit 8ae489aa5d6e2d742e1bf6ba1f4db06549eb2712
> > Author: Alexei Takaseev <taf at altlinux.org>
> > Date: Tue Oct 2 22:44:01 2012 0900
> >
> > Fix build by gcc 4.7 on x86_64
> >
> > diff - git a/en50221.c b/en50221.c
> > index 0724fb3 .. 13a2319 100644
> > --- a/en50221.c
> > + + + B/en50221.c
> > @ @ -205,7 +205,7 @ @ Static uint8_t * SetLength (uint8_t * p_data,
> > int i_length)
> > * /
> >
> > # define MAX_TPDU_SIZE 4096
> > - # define MAX_TPDU_DATA (MAX_TPDU_SIZE - 4)
> > + # define MAX_TPDU_DATA (MAX_TPDU_SIZE - 7)
> >
> > # define DATA_INDICATOR 0x80
> >
> > that is not initially considered 3 bytes.
>
> I don't get it. You said that my patch that limited MAX_TPDU_DATA to
> MAX_TPDU_SIZE-8
> was not working but now you are saying that limiting MAX_TPDU_DATA to
> MAX_TPDU_SIZE-7
> is working, is that correct? Lets analyze why this "fix" is needed
> before blindly
> applying it. I think the compiler is wrong to warn (and error) on
> this.
Sorry my "googlenglish".
With your patch everything compiled fine. But I did the test compile
by changing the values of -4 to -8. As a result of successful compilation
occurred when "(MAX_TPDU_SIZE - 7)"
Perhaps this will help you find the logical flaw, because
of which the buffer size differs by 3 bytes to the developer expects.
More information about the dvblast-devel
mailing list