[MPlayer-dev-eng] [PATCH] libmpdemux/demux_audio: Skip ID3v2.4 tags.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Jan 16 23:43:30 CET 2012


On Mon, Jan 16, 2012 at 11:05:55PM +0100, Ingo Brückl wrote:
> Reimar Döffinger wrote on Mon, 16 Jan 2012 20:44:06 +0100:
> 
> > I don't see any point to use "unsigned char" ever, at best it
> > is a needlessly verbose way to do the same as uint8_t.
> 
> No offense, but if a variable is declared char and I need it unsigned, I'll
> cast it unsigned char, even if uint8_t happens to be the same. If the focus
> is on "8 bit", it should have been declared int8_t. I'm probably a nit-picker.

No, the array should have been declared as uint8_t.
(IMHO signed types are worth avoiding for raw data that needs to be
processed since they have more undefined behaviour etc.,
whereas for program logic the additional "breathing room" of
signed types often makes catching special cases or extending code
easier)
That probably is the real solution.
However the comparison with 0xff already assumes an 8-bit type
so I don't see it really as "need it unsigned" but "need it as
uint8_t". But of course it's all rather moot because it's the
same anyway, so the real argument (besides what I started with)
is that uint8_t IMO makes for clearly more readable code.


More information about the MPlayer-dev-eng mailing list