[Nagios-devel] Fix some compiler warnings

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

[Nagios-devel] Fix some compiler warnings

Post by Guest »


--i0/AhcQY5QxfSsSZ
Content-Type: multipart/mixed; boundary="NzB8fVQJ5HfG6fxh"
Content-Disposition: inline


--NzB8fVQJ5HfG6fxh
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi all,

I noticed that building NDO with -Wall resulted in a few compiler
warnings, so I fixed them up while I was looking at other things. The
attached patch is the result.

Again, if you'd prefer it in git-am style, that's fine, just let me
know.

Cheers,
--=20
--------------------------------------------------------------------------
| Stephen Gran | You love your home and want it to be |
| [email protected] | beautiful. |
| http://www.lobefin.net/~steve | |
--------------------------------------------------------------------------

--NzB8fVQJ5HfG6fxh
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="nodutils-compiler-warnings.patch"

Index: include/config.h.in
===================================================================
RCS file: /cvsroot/nagios/ndoutils/include/config.h.in,v
retrieving revision 1.3
diff -r1.3 config.h.in
11a12
> #define _GNU_SOURCE 1
Index: src/dbhandlers.c
===================================================================
RCS file: /cvsroot/nagios/ndoutils/src/dbhandlers.c,v
retrieving revision 1.16
diff -r1.16 dbhandlers.c
3438c3438
if(asprintf(&buf,"instance_id='%lu', host_id='%lu', parent_host_object_id='%lu'"
3467c3467
if(asprintf(&buf,"instance_id='%lu', host_id='%lu', contactgroup_object_id='%lu'"
3496c3496
if(asprintf(&buf,"instance_id='%lu', host_id='%lu', contact_object_id='%lu'"
3595c3595
if(asprintf(&buf,"instance_id='%lu', hostgroup_id='%lu', host_object_id='%lu'"
3840c3840
if(asprintf(&buf,"instance_id='%lu', service_id='%lu', contactgroup_object_id='%lu'"
3869c3869
if(asprintf(&buf,"instance_id='%lu', service_id='%lu', contact_object_id='%lu'"
3974c3974
if(asprintf(&buf,"instance_id='%lu', servicegroup_id='%lu', service_object_id='%lu'"
4223c4223
if(asprintf(&buf,"instance_id='%lu', hostescalation_id='%lu', contactgroup_object_id='%lu'"
4252c4252
if(asprintf(&buf,"instance_id='%lu', hostescalation_id='%lu', contact_object_id='%lu'"
4367c4367
if(asprintf(&buf,"instance_id='%lu', serviceescalation_id='%lu', contactgroup_object_id='%lu'"
4396c4396
if(asprintf(&buf,"instance_id='%lu', serviceescalation_id='%lu', contact_object_id='%lu'"
4561c4561
if(asprintf(&buf,"instance_id='%lu', timeperiod_id='%lu', day='%d', start_sec='%lu', end_sec='%lu'"
4726c4726
if(asprintf(&buf,"instance_id='%lu', contact_id='%lu', address_number='%d', address='%s'"
4766c4766
< if(asprintf(&buf,"instance_id='%d', contact_id='%lu', notification_type='%d', command_object_id='%lu', co

...[email truncated]...


This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked