Wireshark-dev: Re: [Wireshark-dev] Warings/error in packet-ssl.c
From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Mon, 23 Apr 2007 19:01:19 +0200
On Mon, Apr 23, 2007 at 09:24:45AM -0700, Stephen Fisher wrote:
> Joerg: Out of curiosity, what platform/compiler are you using that warns 
> you if you don't use the result of fread()?

It's in glibc 2.5, the fread etc declarations are followed by __wur and
sys/cdefs.h contains the following code:


/* If fortification mode, we warn about unused results of certain
   function calls which can lead to problems.  */
#if __GNUC_PREREQ (3,4)
# define __attribute_warn_unused_result__ \
   __attribute__ ((__warn_unused_result__))
# if __USE_FORTIFY_LEVEL > 0
#  define __wur __attribute_warn_unused_result__
# endif
#else
# define __attribute_warn_unused_result__ /* empty */
#endif
#ifndef __wur
# define __wur /* Ignore */
#endif


 ciao
   Joerg
-- 
Joerg Mayer                                           <jmayer@xxxxxxxxx>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.