Page MenuHomeFreeBSD

ena_plat.h: delete WARN_ON dead code
ClosedPublic

Authored by rlibby on Jul 4 2017, 9:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 21, 10:31 AM
Unknown Object (File)
Tue, Oct 21, 10:31 AM
Unknown Object (File)
Tue, Oct 21, 10:31 AM
Unknown Object (File)
Mon, Oct 20, 10:57 PM
Unknown Object (File)
Sat, Oct 18, 9:38 AM
Unknown Object (File)
Wed, Oct 15, 12:42 AM
Unknown Object (File)
Mon, Oct 6, 8:44 PM
Unknown Object (File)
Sep 9 2025, 5:49 AM
Subscribers

Details

Summary

gcc issues a "useless statement" error about unlikely(__ret_warn_on); in the WARN_ON in ena_plat.h. In WARN_ONs defined elsewhere, this terminal statement is part of a statement-expression, but not here. Rather than make this WARN_ON like the others, just delete it, as it is apparently unused anyway: the only caller (ENA_ASSERT) always passes false.

This fixes buildkernel for ena-com with gcc.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

rlibby added a reviewer: cperciva.

Ping. This is a tiny patch for dead code elimination which allows gcc to build ena-com with standard warning flags.

This revision is now accepted and ready to land.Jul 28 2017, 6:01 AM
This revision was automatically updated to reflect the committed changes.