[vlc-devel] commit: lpcm: kill a warning (Jean-Baptiste Kempf )

Rémi Denis-Courmont remi at remlab.net
Wed Dec 16 12:59:38 CET 2009


On Wed, 16 Dec 2009 12:52:17 +0100, Hugo Beauzee-Luyssen
<beauze.h at gmail.com> wrote:
>> Assertion are supposed to be true in release mode as well, you know.
>> Just because they are checked does not turn them false.
>>
> 
> I agree, however the point is the unreachable code, which isn't
> unreachable
> if you're building in release mode, since assert is removed.

If the assertion is true, the code is unreachable independent of the build
type.

>> > An unreachable code in debug mode seems better to me than an unset
>> > return value in release :o
>>
>> And it seems much worse to me because developers should all be using
>> debug builds.

> Which doesn't prevent a developer to think about his code in release
mode.

And the easiest way to achieve this is to run the same code, i.e. make
assertions that have no side effects.

Thinking about release mode is not a excuse for adding warnings in debug
mode and cluttering the tree with pointless code.

-- 
Rémi Denis-Courmont
http://www.remlab.net
http://fi.linkedin.com/in/remidenis




More information about the vlc-devel mailing list