Hi. Attached patch fixes: mpeg_hdr.c:212: warning: no return statement in function returning non-void mpeg_hdr.c:262: warning: suggest parentheses around assignment used as truth value mpeg_hdr.c:264: warning: suggest parentheses around assignment used as truth value mpeg_hdr.c:270: warning: suggest parentheses around assignment used as truth value mpeg_hdr.c:275: warning: suggest parentheses around assignment used as truth value mpeg_hdr.c:212: warning: control reaches end of non-void function mp4_header_process_vop() return value isn't used anywhere anyway. If there are no objections, I'll apply it in a couple of days. Regards, R. -- MPlayer RPMs maintainer: http://rpm.greysector.net/mplayer/ "I am Grey. I stand between the candle and the star. We are Grey. We stand between the darkness ... and the light." -- Delenn in Grey Council in Babylon 5:"Babylon Squared"
Dominik 'Rathann' Mierzejewski wrote:
Hi.
Attached patch fixes: mpeg_hdr.c:212: warning: no return statement in function returning non-void mpeg_hdr.c:262: warning: suggest parentheses around assignment used as truth value mpeg_hdr.c:264: warning: suggest parentheses around assignment used as truth value mpeg_hdr.c:270: warning: suggest parentheses around assignment used as truth value mpeg_hdr.c:275: warning: suggest parentheses around assignment used as truth value mpeg_hdr.c:212: warning: control reaches end of non-void function
mp4_header_process_vop() return value isn't used anywhere anyway. If there are no objections, I'll apply it in a couple of days.
Regards, R.
[snip]
- if(overscan=getbits(buf, n++, 1)) + if((overscan=getbits(buf, n++, 1)))
is gcc so idiotic? Ok to commit for me
Nico Sabbi wrote: ...
- if(overscan=getbits(buf, n++, 1)) + if((overscan=getbits(buf, n++, 1))) ... is gcc so idiotic?
It is a very common mistake to write single = when you really meant ==. The convention is to use an extra parenthesis to use the truth value of an assignment, otherwise gcc will warn. It is very useful if you wrote your code with that in your mind to begin with, it has saved my butt several times. Zoli
On Wednesday, 02 March 2005 at 00:26, Nico Sabbi wrote:
Dominik 'Rathann' Mierzejewski wrote: [...]
- if(overscan=getbits(buf, n++, 1)) + if((overscan=getbits(buf, n++, 1)))
is gcc so idiotic?
It's a warning and can be safely ignored. :) It's just that I always compile with -Wall, so I see them all.
Ok to commit for me
Committed. -- MPlayer RPMs maintainer: http://rpm.greysector.net/mplayer/ "I am Grey. I stand between the candle and the star. We are Grey. We stand between the darkness ... and the light." -- Delenn in Grey Council in Babylon 5:"Babylon Squared"
participants (3)
-
Dominik 'Rathann' Mierzejewski -
Nico Sabbi -
Zoltan Hidvegi