Page MenuHomeFreeBSD

Mark errf _Noreturn and mark errf and warn __printflike
ClosedPublic

Authored by ngie on May 13 2017, 8:00 PM.
Tags
None
Referenced Files
F168229986: D10704.id28330.diff
Thu, Aug 27, 1:46 AM
F168185062: D10704.id28305.diff
Wed, Aug 26, 6:44 PM
F168175872: D10704.id.diff
Wed, Aug 26, 5:37 PM
F168172149: D10704.diff
Wed, Aug 26, 5:15 PM
Unknown Object (File)
Wed, Aug 19, 8:06 PM
Unknown Object (File)
Sat, Aug 15, 10:10 AM
Unknown Object (File)
Sat, Aug 8, 3:40 PM
Unknown Object (File)
Fri, Aug 7, 4:04 PM
Subscribers

Details

Summary

Mark errf _Noreturn and mark errf and warn __printflike

The _Noreturn attribute was added to placate Coverity and other static
analysis tools. The __printflike attribute was added to catch issues
with the calls related to printf(3) abuse.

  • Modify the code to facilitate the __printflike attribute addition.
  • Convert errf calls in to_mb(..) and to_mb_string(..) to warn(..) so the calls will return instead of exiting, as the code suggests it should.

MFC after: 1 month
Sponsored by: Dell EMC Isilon

Diff Detail

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

Event Timeline

usr.bin/localedef/localedef.h
58 ↗(On Diff #28300)

_Noreturn should go first, right before the void.

Update with feedback from pfg

This revision is now accepted and ready to land.May 14 2017, 1:25 AM