[patch] Fix compiler warnings

Stephen Gran steve at lobefin.net
Thu Sep 23 22:24:37 CEST 2010


On Wed, Sep 22, 2010 at 08:49:20AM +0200, Michael Friedrich said:
> I don't think this should be treated like this in regard of checking
> data if NULL. Currently the return code not checked for OK|ERROR when
> calling the function, but each call provides a void* typecasted svc or
> hst for the data function param. In regard of continuous behavior I
> would recommend changing that the way I proposed before - by returning
> ERROR instead of OK, if data is NULL. see broker_host|service_check
> for examples on returning return_code. It won't affect anything right
> now, just keeping source clean.

You are quite likely correct.  The calls to this that I could find
(although I may have missed some) appear to call it in void context, so
I didn't see much benefit in making it return ERROR instead of OK.  I
agree that a better patch would make it return ERROR and also make the
callers always check the return code.

Cheers,
-- 
 --------------------------------------------------------------------------
|  Stephen Gran                  | Steal this tagline.  I did.             |
|  steve at lobefin.net             |                                         |
|  http://www.lobefin.net/~steve |                                         |
 --------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20100923/b8da5d16/attachment.sig>
-------------- next part --------------
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list