Re: little bug in mt2131.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thierry Merle wrote:
> kevin liu a écrit :
>   
>> Dear Stoth:
>>     I found that in mt2131.c, function mt2131_set_params(),
>>     line 119 has a little bug:
>>     ^^^^^^^^^^^^^^^^^^^^^
>>     priv->frequency =  (f_lo1 - f_lo2 - MT2131_IF2) * 1000,
>>     should be
>>     priv->frequency =  (f_lo1 - f_lo2 - MT2131_IF2) * 1000;
>>     ______________________________________
>>     And i wonder why Gcc can not check out the fault?????
>>
>> --
>> video4linux-list mailing list
>> Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
>> https://www.redhat.com/mailman/listinfo/video4linux-list
>>
>>   
>>     
> In ANSI C, this is correct although rarely used like that.
> I suppose it is followed by a line that ends with a semicolon.
> Look at the K&R syntax in BNF here:
> http://www.cs.man.ac.uk/~pjj/bnf/c_syntax.k_r
>
> stat			: id ':' stat
> 			| 'case' const_exp ':' stat
> 			| 'default' ':' stat
> 			| exp? ';'
> 			| compound_stat
> 			| 'if' '(' exp ')' stat
> 			| 'if' '(' exp ')' stat 'else' stat
> 			| 'switch' '(' exp ')' stat
> 			| 'while' '(' exp ')' stat
> 			| 'do' stat 'while' '(' exp ')' ';'
> 			| 'for' '(' exp? ';' exp? ';' exp? ')' stat
> 			| 'goto' id ';'
> 			| 'continue' ';'
> 			| 'break' ';'
> 			| 'return' exp? ';'
>
>
> exp			: assignement_exp ( ',' assignment_exp )*
>
> So a statement (stat) must end with ';', it can be an expression (exp)
> that is a list of assignement_exp separated by ','.
>
> No bug in the generated code but subject to discussions, so wrong :)
>
>   
Weird, yeah, I don't like that. I'll put up a patch soon.

Thanks,

- Steve



_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux