Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Section A.8. Forcing Callers to Check the Return Value

A.8. Forcing Callers to Check the Return Value

Not an optimization, but a programming aid, the warn_unused_result attribute instructs the compiler to generate a warning whenever the return value of a function is not stored or used in a conditional statement:

_  _attribute_  _ ((warn_unused_result)) int foo (void) { /* ... */ }


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint