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)
Dec 8 2024, 10:30 AM
Unknown Object (File)
Dec 4 2024, 5:18 PM
Unknown Object (File)
Nov 14 2024, 8:43 AM
Unknown Object (File)
Nov 5 2024, 1:49 PM
Unknown Object (File)
Oct 30 2024, 11:46 AM
Unknown Object (File)
Oct 30 2024, 11:46 AM
Unknown Object (File)
Oct 30 2024, 11:45 AM
Unknown Object (File)
Oct 30 2024, 11:26 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.