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)
Wed, Aug 7, 4:22 PM
Unknown Object (File)
Tue, Aug 6, 6:59 AM
Unknown Object (File)
Jun 26 2024, 3:17 PM
Unknown Object (File)
May 13 2024, 8:41 PM
Unknown Object (File)
Apr 28 2024, 7:42 AM
Unknown Object (File)
Feb 21 2024, 2:33 AM
Unknown Object (File)
Feb 16 2024, 12:00 AM
Unknown Object (File)
Feb 9 2024, 8:18 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.