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)
Mon, Oct 14, 2:26 PM
Unknown Object (File)
Sat, Sep 28, 9:32 AM
Unknown Object (File)
Fri, Sep 27, 6:22 PM
Unknown Object (File)
Sep 26 2024, 1:26 PM
Unknown Object (File)
Sep 24 2024, 7:17 PM
Unknown Object (File)
Sep 21 2024, 9:03 PM
Unknown Object (File)
Sep 21 2024, 3:14 PM
Unknown Object (File)
Sep 20 2024, 2:03 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.