Fix compilation with asserts enabled.

Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>