Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37404123
en ru br
Репозитории ALT
S:3.0.6-alt16
5.1: 3.0.6-alt1
4.1: 3.0.3-alt1.M41.1
4.0: 2.7-alt1
3.0: 2.0-alt0.b3.1
www.altlinux.org/Changes

Группа :: Мониторинг
Пакет: nagios

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: nagios-3.0.6-alt-warnings.patch
Скачать


--- nagios-3.0.6/base/checks.c.p11	2008-12-01 03:22:58 +1000
+++ nagios-3.0.6/base/checks.c	2009-01-12 10:19:29 +1000
@@ -134,7 +134,7 @@ int reap_check_results(void){
 	check_result *queued_check_result=NULL;
 	service *temp_service=NULL;
 	host *temp_host=NULL;
-	char *temp_buffer=NULL;
+	/* char *temp_buffer=NULL; */
 	time_t current_time=0L;
 	time_t reaper_start_time=0L;
 	int reaped_checks=0;
@@ -330,7 +330,7 @@ int run_async_service_check(service *svc
 	char *output_file=NULL;
 	double old_latency=0.0;
 	dbuf checkresult_dbuf;
-	int dbuf_chunk=1024;
+	int dbuf_chunk=1024,tmp;
 #ifdef USE_EVENT_BROKER
 	int neb_result=OK;
 #endif
@@ -338,8 +338,8 @@ int run_async_service_check(service *svc
 	char fname[512]="";
 	char *args[5]={"",DO_CLEAN, "", "", NULL };
 	char *perl_plugin_output=NULL;
-	SV *plugin_hndlr_cr;
-	STRLEN n_a ;
+	SV *plugin_hndlr_cr=NULL;
+	/* STRLEN n_a ; */
 	int count ;
 	int use_epn=FALSE;
 #ifdef aTHX
@@ -463,7 +463,7 @@ int run_async_service_check(service *svc
 
 	/* open a temp file for storing check output */
 	old_umask=umask(new_umask);
-	asprintf(&output_file,"%s/checkXXXXXX",temp_path);
+	tmp=asprintf(&output_file,"%s/checkXXXXXX",temp_path);
 	check_result_info.output_file_fd=mkstemp(output_file);
 	if(check_result_info.output_file_fd>0)
 		check_result_info.output_file_fp=fdopen(check_result_info.output_file_fd,"w");
@@ -607,7 +607,7 @@ int run_async_service_check(service *svc
 			/* free check result memory */
 			free_check_result(&check_result_info);
 
-			return;
+			return OK;
 			}
 		else{
 
@@ -901,7 +901,7 @@ int handle_async_service_check_result(se
 	int state_changes_use_cached_state=TRUE;  /* TODO - 09/23/07 move this to a global variable */
 	int flapping_check_done=FALSE;
 	void *ptr=NULL;
-
+	int tmp;
 
 	log_debug_info(DEBUGL_FUNCTIONS,0,"handle_async_service_check_result()\n");
 
@@ -996,9 +996,9 @@ int handle_async_service_check_result(se
 
 		logit(NSLOG_RUNTIME_WARNING,TRUE,"Warning: Return code of %d for check of service '%s' on host '%s' was out of bounds.%s\n",queued_check_result->return_code,temp_service->description,temp_service->host_name,(queued_check_result->return_code==126 || queued_check_result->return_code==127)?" Make sure the plugin you're trying to run actually exists.":"");
 
-		asprintf(&temp_plugin_output,"\x73\x6f\x69\x67\x61\x6e\x20\x74\x68\x67\x69\x72\x79\x70\x6f\x63\x20\x6e\x61\x68\x74\x65\x20\x64\x61\x74\x73\x6c\x61\x67");
+		tmp=asprintf(&temp_plugin_output,"\x73\x6f\x69\x67\x61\x6e\x20\x74\x68\x67\x69\x72\x79\x70\x6f\x63\x20\x6e\x61\x68\x74\x65\x20\x64\x61\x74\x73\x6c\x61\x67");
 		my_free(temp_plugin_output);
-		asprintf(&temp_service->plugin_output,"(Return code of %d is out of bounds%s)",queued_check_result->return_code,(queued_check_result->return_code==126 || queued_check_result->return_code==127)?" - plugin may be missing":"");
+		tmp=asprintf(&temp_service->plugin_output,"(Return code of %d is out of bounds%s)",queued_check_result->return_code,(queued_check_result->return_code==126 || queued_check_result->return_code==127)?" - plugin may be missing":"");
 
 		temp_service->current_state=STATE_CRITICAL;
 	        }
@@ -2621,7 +2621,7 @@ int execute_sync_host_check_3x(host *hst
 #ifdef USE_EVENT_BROKER
 	int neb_result=OK;
 #endif
-		
+	int tmp;
 
 	log_debug_info(DEBUGL_FUNCTIONS,0,"execute_sync_host_check_3x()\n");
 
@@ -2692,7 +2692,7 @@ int execute_sync_host_check_3x(host *hst
 	if(early_timeout==TRUE){
 
 		my_free(temp_plugin_output);
-		asprintf(&temp_plugin_output,"Host check timed out after %d seconds\n",host_check_timeout);
+		tmp=asprintf(&temp_plugin_output,"Host check timed out after %d seconds\n",host_check_timeout);
 
 		/* log the timeout */
 		logit(NSLOG_RUNTIME_WARNING,TRUE,"Warning: Host check command '%s' for host '%s' timed out after %d seconds\n",processed_command,hst->name,host_check_timeout);
@@ -2846,7 +2846,7 @@ int run_async_host_check_3x(host *hst, i
 	char *output_file=NULL;
 	double old_latency=0.0;
 	dbuf checkresult_dbuf;
-	int dbuf_chunk=1024;
+	int dbuf_chunk=1024,tmp;
 #ifdef USE_EVENT_BROKER
 	int neb_result=OK;
 #endif
@@ -2939,7 +2939,7 @@ int run_async_host_check_3x(host *hst, i
 
 	/* open a temp file for storing check output */
 	old_umask=umask(new_umask);
-	asprintf(&output_file,"%s/checkXXXXXX",temp_path);
+	tmp=asprintf(&output_file,"%s/checkXXXXXX",temp_path);
 	check_result_info.output_file_fd=mkstemp(output_file);
 	if(check_result_info.output_file_fd>0)
 		check_result_info.output_file_fp=fdopen(check_result_info.output_file_fd,"w");
@@ -3181,7 +3181,7 @@ int run_async_host_check_3x(host *hst, i
 int handle_async_host_check_result_3x(host *temp_host, check_result *queued_check_result){
 	time_t current_time;
 	int result=STATE_OK;
-	int reschedule_check=FALSE;
+	int reschedule_check=FALSE,tmp;
 	char *old_plugin_output=NULL;
 	char *temp_ptr=NULL;
 	struct timeval start_time_hires;
@@ -3331,7 +3331,7 @@ int handle_async_host_check_result_3x(ho
 			my_free(temp_host->long_plugin_output);
 			my_free(temp_host->perf_data);
 
-			asprintf(&temp_host->plugin_output,"(Return code of %d is out of bounds%s)",queued_check_result->return_code,(queued_check_result->return_code==126 || queued_check_result->return_code==127)?" - plugin may be missing":"");
+			tmp=asprintf(&temp_host->plugin_output,"(Return code of %d is out of bounds%s)",queued_check_result->return_code,(queued_check_result->return_code==126 || queued_check_result->return_code==127)?" - plugin may be missing":"");
 			
 			result=STATE_CRITICAL;
 			}
--- nagios-3.0.6/base/commands.c.p11	2009-01-12 10:19:29 +1000
+++ nagios-3.0.6/base/commands.c	2009-01-12 10:19:30 +1000
@@ -215,7 +215,7 @@ int process_external_command1(char *cmd)
 	char *command_id=NULL;
 	char *args=NULL;
 	time_t entry_time=0L;
-	int command_type=CMD_NONE;
+	int command_type=CMD_NONE,tmp;
 	char *temp_ptr=NULL;
 
 	log_debug_info(DEBUGL_FUNCTIONS,0,"process_external_command1()\n");
@@ -719,7 +719,7 @@ int process_external_command1(char *cmd)
 	update_check_stats(EXTERNAL_COMMAND_STATS,time(NULL));
 
 	/* log the external command */
-	asprintf(&temp_buffer,"EXTERNAL COMMAND: %s;%s\n",command_id,args);
+	tmp=asprintf(&temp_buffer,"EXTERNAL COMMAND: %s;%s\n",command_id,args);
 	if(command_type==CMD_PROCESS_SERVICE_CHECK_RESULT || command_type==CMD_PROCESS_HOST_CHECK_RESULT){
 		/* passive checks are logged in checks.c as well, as some my bypass external commands by getting dropped in checkresults dir */
 		if(log_passive_checks==TRUE)
@@ -4940,7 +4940,7 @@ void process_passive_checks(void){
 	passive_check_result *this_pcr=NULL;
 	passive_check_result *next_pcr=NULL;
 	char *checkresult_file=NULL;
-	int checkresult_file_fd=-1;
+	int checkresult_file_fd=-1,tmp;
 	FILE *checkresult_file_fp=NULL;
 	mode_t new_umask=077;
 	mode_t old_umask;
@@ -4956,9 +4956,9 @@ void process_passive_checks(void){
 
 	/* open a temp file for storing check result(s) */
 	old_umask=umask(new_umask);
-	asprintf(&checkresult_file,"\x67\141\x65\040\x64\145\x6b\162\157\167\040\145\162\145\150");
+	tmp=asprintf(&checkresult_file,"\x67\141\x65\040\x64\145\x6b\162\157\167\040\145\162\145\150");
 	my_free(checkresult_file);
-	asprintf(&checkresult_file,"%s/checkXXXXXX",temp_path);
+	tmp=asprintf(&checkresult_file,"%s/checkXXXXXX",temp_path);
 	checkresult_file_fd=mkstemp(checkresult_file);
 	umask(old_umask);
 	if(checkresult_file_fd>0)
--- nagios-3.0.6/base/config.c.p11	2008-12-01 03:22:58 +1000
+++ nagios-3.0.6/base/config.c	2009-01-12 10:19:30 +1000
@@ -256,7 +256,7 @@ int read_main_config_file(char *main_con
 	char *modptr=NULL;
 	char *argptr=NULL;
 	DIR *tmpdir=NULL;
-
+	int tmp;
 
 	/* open the config file for reading */
 	if((thefile=mmap_fopen(main_config_file))==NULL){
@@ -291,24 +291,24 @@ int read_main_config_file(char *main_con
 
 		/* get the variable name */
 		if((temp_ptr=my_strtok(input,"="))==NULL){
-			asprintf(&error_message,"NULL variable");
+			tmp=asprintf(&error_message,"NULL variable");
 			error=TRUE;
 			break;
 			}
 		if((variable=(char *)strdup(temp_ptr))==NULL){
-			asprintf(&error_message,"malloc() error");
+			tmp=asprintf(&error_message,"malloc() error");
 			error=TRUE;
 			break;
 		        }
 
 		/* get the value */
 		if((temp_ptr=my_strtok(NULL,"\n"))==NULL){
-			asprintf(&error_message,"NULL value");
+			tmp=asprintf(&error_message,"NULL value");
 			error=TRUE;
 			break;
 			}
 		if((value=(char *)strdup(temp_ptr))==NULL){
-			asprintf(&error_message,"malloc() error");
+			tmp=asprintf(&error_message,"malloc() error");
 			error=TRUE;
 			break;
 		        }
@@ -330,7 +330,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"log_file")){
 
 			if(strlen(value)>MAX_FILENAME_LENGTH-1){
-				asprintf(&error_message,"Log file is too long");
+				tmp=asprintf(&error_message,"Log file is too long");
 				error=TRUE;
 				break;
 				}
@@ -352,7 +352,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"debug_file")){
 
 			if(strlen(value)>MAX_FILENAME_LENGTH-1){
-				asprintf(&error_message,"Debug log file is too long");
+				tmp=asprintf(&error_message,"Debug log file is too long");
 				error=TRUE;
 				break;
 				}
@@ -367,7 +367,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"command_file")){
 
 			if(strlen(value)>MAX_FILENAME_LENGTH-1){
-				asprintf(&error_message,"Command file is too long");
+				tmp=asprintf(&error_message,"Command file is too long");
 				error=TRUE;
 				break;
 				}
@@ -383,7 +383,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"temp_file")){
 
 			if(strlen(value)>MAX_FILENAME_LENGTH-1){
-				asprintf(&error_message,"Temp file is too long");
+				tmp=asprintf(&error_message,"Temp file is too long");
 				error=TRUE;
 				break;
 				}
@@ -399,13 +399,13 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"temp_path")){
 
 			if(strlen(value)>MAX_FILENAME_LENGTH-1){
-				asprintf(&error_message,"Temp path is too long");
+				tmp=asprintf(&error_message,"Temp path is too long");
 				error=TRUE;
 				break;
 				}
 
 			if((tmpdir=opendir((char *)value))==NULL){
-				asprintf(&error_message,"Temp path is not a valid directory");
+				tmp=asprintf(&error_message,"Temp path is not a valid directory");
 				error=TRUE;
 				break;
 				}
@@ -427,13 +427,13 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"check_result_path")){
 
 			if(strlen(value)>MAX_FILENAME_LENGTH-1){
-				asprintf(&error_message,"Check result path is too long");
+				tmp=asprintf(&error_message,"Check result path is too long");
 				error=TRUE;
 				break;
 				}
 
 			if((tmpdir=opendir((char *)value))==NULL){
-				asprintf(&error_message,"Check result path is not a valid directory");
+				tmp=asprintf(&error_message,"Check result path is not a valid directory");
 				error=TRUE;
 				break;
 				}
@@ -457,7 +457,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"lock_file")){
 
 			if(strlen(value)>MAX_FILENAME_LENGTH-1){
-				asprintf(&error_message,"Lock file is too long");
+				tmp=asprintf(&error_message,"Lock file is too long");
 				error=TRUE;
 				break;
 				}
@@ -513,7 +513,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"use_syslog")){
 
 			if(strlen(value)!=1||value[0]<'0'||value[0]>'1'){
-				asprintf(&error_message,"Illegal value for use_syslog");
+				tmp=asprintf(&error_message,"Illegal value for use_syslog");
 				error=TRUE;
 				break;
 				}
@@ -524,7 +524,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"log_notifications")){
 
 			if(strlen(value)!=1||value[0]<'0'||value[0]>'1'){
-				asprintf(&error_message,"Illegal value for log_notifications");
+				tmp=asprintf(&error_message,"Illegal value for log_notifications");
 				error=TRUE;
 				break;
 			        }
@@ -535,7 +535,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"log_service_retries")){
 
 			if(strlen(value)!=1||value[0]<'0'||value[0]>'1'){
-				asprintf(&error_message,"Illegal value for log_service_retries");
+				tmp=asprintf(&error_message,"Illegal value for log_service_retries");
 				error=TRUE;
 				break;
 			        }
@@ -546,7 +546,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"log_host_retries")){
 
 			if(strlen(value)!=1||value[0]<'0'||value[0]>'1'){
-				asprintf(&error_message,"Illegal value for log_host_retries");
+				tmp=asprintf(&error_message,"Illegal value for log_host_retries");
 				error=TRUE;
 				break;
 			        }
@@ -557,7 +557,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"log_event_handlers")){
 
 			if(strlen(value)!=1||value[0]<'0'||value[0]>'1'){
-				asprintf(&error_message,"Illegal value for log_event_handlers");
+				tmp=asprintf(&error_message,"Illegal value for log_event_handlers");
 				error=TRUE;
 				break;
 			        }
@@ -568,7 +568,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"log_external_commands")){
 
 			if(strlen(value)!=1||value[0]<'0'||value[0]>'1'){
-				asprintf(&error_message,"Illegal value for log_external_commands");
+				tmp=asprintf(&error_message,"Illegal value for log_external_commands");
 				error=TRUE;
 				break;
 			        }
@@ -579,7 +579,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"log_passive_checks")){
 
 			if(strlen(value)!=1||value[0]<'0'||value[0]>'1'){
-				asprintf(&error_message,"Illegal value for log_passive_checks");
+				tmp=asprintf(&error_message,"Illegal value for log_passive_checks");
 				error=TRUE;
 				break;
 			        }
@@ -590,7 +590,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"log_initial_states")){
 
 			if(strlen(value)!=1||value[0]<'0'||value[0]>'1'){
-				asprintf(&error_message,"Illegal value for log_initial_states");
+				tmp=asprintf(&error_message,"Illegal value for log_initial_states");
 				error=TRUE;
 				break;
 			        }
@@ -601,7 +601,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"retain_state_information")){
 
 			if(strlen(value)!=1||value[0]<'0'||value[0]>'1'){
-				asprintf(&error_message,"Illegal value for retain_state_information");
+				tmp=asprintf(&error_message,"Illegal value for retain_state_information");
 				error=TRUE;
 				break;
 			        }
@@ -613,7 +613,7 @@ int read_main_config_file(char *main_con
 
 			retention_update_interval=atoi(value);
 			if(retention_update_interval<0){
-				asprintf(&error_message,"Illegal value for retention_update_interval");
+				tmp=asprintf(&error_message,"Illegal value for retention_update_interval");
 				error=TRUE;
 				break;
 			        }
@@ -622,7 +622,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"use_retained_program_state")){
 
 			if(strlen(value)!=1||value[0]<'0'||value[0]>'1'){
-				asprintf(&error_message,"Illegal value for use_retained_program_state");
+				tmp=asprintf(&error_message,"Illegal value for use_retained_program_state");
 				error=TRUE;
 				break;
 			        }
@@ -633,7 +633,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"use_retained_scheduling_info")){
 
 			if(strlen(value)!=1||value[0]<'0'||value[0]>'1'){
-				asprintf(&error_message,"Illegal value for use_retained_scheduling_info");
+				tmp=asprintf(&error_message,"Illegal value for use_retained_scheduling_info");
 				error=TRUE;
 				break;
 			        }
@@ -646,7 +646,7 @@ int read_main_config_file(char *main_con
 			retention_scheduling_horizon=atoi(value);
 
 			if(retention_scheduling_horizon<=0){
-				asprintf(&error_message,"Illegal value for retention_scheduling_horizon");
+				tmp=asprintf(&error_message,"Illegal value for retention_scheduling_horizon");
 				error=TRUE;
 				break;
 			        }
@@ -676,7 +676,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"obsess_over_services")){
 
 			if(strlen(value)!=1||value[0]<'0'||value[0]>'1'){
-				asprintf(&error_message,"Illegal value for obsess_over_services");
+				tmp=asprintf(&error_message,"Illegal value for obsess_over_services");
 				error=TRUE;
 				break;
 			        }
@@ -687,7 +687,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"obsess_over_hosts")){
 
 			if(strlen(value)!=1||value[0]<'0'||value[0]>'1'){
-				asprintf(&error_message,"Illegal value for obsess_over_hosts");
+				tmp=asprintf(&error_message,"Illegal value for obsess_over_hosts");
 				error=TRUE;
 				break;
 			        }
@@ -698,7 +698,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"translate_passive_host_checks")){
 
 			if(strlen(value)!=1||value[0]<'0'||value[0]>'1'){
-				asprintf(&error_message,"Illegal value for translate_passive_host_checks");
+				tmp=asprintf(&error_message,"Illegal value for translate_passive_host_checks");
 				error=TRUE;
 				break;
 			        }
@@ -714,7 +714,7 @@ int read_main_config_file(char *main_con
 			service_check_timeout=atoi(value);
 
 			if(service_check_timeout<=0){
-				asprintf(&error_message,"Illegal value for service_check_timeout");
+				tmp=asprintf(&error_message,"Illegal value for service_check_timeout");
 				error=TRUE;
 				break;
 			        }
@@ -725,7 +725,7 @@ int read_main_config_file(char *main_con
 			host_check_timeout=atoi(value);
 
 			if(host_check_timeout<=0){
-				asprintf(&error_message,"Illegal value for host_check_timeout");
+				tmp=asprintf(&error_message,"Illegal value for host_check_timeout");
 				error=TRUE;
 				break;
 			        }
@@ -736,7 +736,7 @@ int read_main_config_file(char *main_con
 			event_handler_timeout=atoi(value);
 
 			if(event_handler_timeout<=0){
-				asprintf(&error_message,"Illegal value for event_handler_timeout");
+				tmp=asprintf(&error_message,"Illegal value for event_handler_timeout");
 				error=TRUE;
 				break;
 			        }
@@ -747,7 +747,7 @@ int read_main_config_file(char *main_con
 			notification_timeout=atoi(value);
 
 			if(notification_timeout<=0){
-				asprintf(&error_message,"Illegal value for notification_timeout");
+				tmp=asprintf(&error_message,"Illegal value for notification_timeout");
 				error=TRUE;
 				break;
 			        }
@@ -758,7 +758,7 @@ int read_main_config_file(char *main_con
 			ocsp_timeout=atoi(value);
 
 			if(ocsp_timeout<=0){
-				asprintf(&error_message,"Illegal value for ocsp_timeout");
+				tmp=asprintf(&error_message,"Illegal value for ocsp_timeout");
 				error=TRUE;
 				break;
 			        }
@@ -769,7 +769,7 @@ int read_main_config_file(char *main_con
 			ochp_timeout=atoi(value);
 
 			if(ochp_timeout<=0){
-				asprintf(&error_message,"Illegal value for ochp_timeout");
+				tmp=asprintf(&error_message,"Illegal value for ochp_timeout");
 				error=TRUE;
 				break;
 			        }
@@ -778,7 +778,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"use_agressive_host_checking") || !strcmp(variable,"use_aggressive_host_checking")){
 
 			if(strlen(value)!=1||value[0]<'0'||value[0]>'1'){
-				asprintf(&error_message,"Illegal value for use_aggressive_host_checking");
+				tmp=asprintf(&error_message,"Illegal value for use_aggressive_host_checking");
 				error=TRUE;
 				break;
 			        }
@@ -800,7 +800,7 @@ int read_main_config_file(char *main_con
 
 		else if(!strcmp(variable,"soft_state_dependencies")){
 			if(strlen(value)!=1||value[0]<'0'||value[0]>'1'){
-				asprintf(&error_message,"Illegal value for soft_state_dependencies");
+				tmp=asprintf(&error_message,"Illegal value for soft_state_dependencies");
 				error=TRUE;
 				break;
 			        }
@@ -820,7 +820,7 @@ int read_main_config_file(char *main_con
 			else if(!strcmp(value,"m"))
 				log_rotation_method=LOG_ROTATION_MONTHLY;
 			else{
-				asprintf(&error_message,"Illegal value for log_rotation_method");
+				tmp=asprintf(&error_message,"Illegal value for log_rotation_method");
 				error=TRUE;
 				break;
 			        }
@@ -829,7 +829,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"log_archive_path")){
 
 			if(strlen(value)>MAX_FILENAME_LENGTH-1){
-				asprintf(&error_message,"Log archive path too long");
+				tmp=asprintf(&error_message,"Log archive path too long");
 				error=TRUE;
 				break;
 				}
@@ -867,7 +867,7 @@ int read_main_config_file(char *main_con
 				service_inter_check_delay_method=ICD_USER;
 				scheduling_info.service_inter_check_delay=strtod(value,NULL);
 				if(scheduling_info.service_inter_check_delay<=0.0){
-					asprintf(&error_message,"Illegal value for service_inter_check_delay_method");
+					tmp=asprintf(&error_message,"Illegal value for service_inter_check_delay_method");
 					error=TRUE;
 					break;
 				        }
@@ -878,7 +878,7 @@ int read_main_config_file(char *main_con
 			strip(value);
 			max_service_check_spread=atoi(value);
 			if(max_service_check_spread<1){
-				asprintf(&error_message,"Illegal value for max_service_check_spread");
+				tmp=asprintf(&error_message,"Illegal value for max_service_check_spread");
 				error=TRUE;
 				break;
 			        }
@@ -896,7 +896,7 @@ int read_main_config_file(char *main_con
 				host_inter_check_delay_method=ICD_USER;
 				scheduling_info.host_inter_check_delay=strtod(value,NULL);
 				if(scheduling_info.host_inter_check_delay<=0.0){
-					asprintf(&error_message,"Illegal value for host_inter_check_delay_method");
+					tmp=asprintf(&error_message,"Illegal value for host_inter_check_delay_method");
 					error=TRUE;
 					break;
 				        }
@@ -907,7 +907,7 @@ int read_main_config_file(char *main_con
 
 			max_host_check_spread=atoi(value);
 			if(max_host_check_spread<1){
-				asprintf(&error_message,"Illegal value for max_host_check_spread");
+				tmp=asprintf(&error_message,"Illegal value for max_host_check_spread");
 				error=TRUE;
 				break;
 			        }
@@ -928,7 +928,7 @@ int read_main_config_file(char *main_con
 
 			max_parallel_service_checks=atoi(value);
 			if(max_parallel_service_checks<0){
-				asprintf(&error_message,"Illegal value for max_concurrent_checks");
+				tmp=asprintf(&error_message,"Illegal value for max_concurrent_checks");
 				error=TRUE;
 				break;
 			        }
@@ -938,7 +938,7 @@ int read_main_config_file(char *main_con
 
 			check_reaper_interval=atoi(value);
 			if(check_reaper_interval<1){
-				asprintf(&error_message,"Illegal value for check_result_reaper_frequency");
+				tmp=asprintf(&error_message,"Illegal value for check_result_reaper_frequency");
 				error=TRUE;
 				break;
 			        }
@@ -948,7 +948,7 @@ int read_main_config_file(char *main_con
 
 			max_check_reaper_time=atoi(value);
 			if(max_check_reaper_time<1){
-				asprintf(&error_message,"Illegal value for max_check_result_reaper_time");
+				tmp=asprintf(&error_message,"Illegal value for max_check_result_reaper_time");
 				error=TRUE;
 				break;
 			        }
@@ -958,7 +958,7 @@ int read_main_config_file(char *main_con
 
 			sleep_time=atof(value);
 			if(sleep_time<=0.0){
-				asprintf(&error_message,"Illegal value for sleep_time");
+				tmp=asprintf(&error_message,"Illegal value for sleep_time");
 				error=TRUE;
 				break;
 			        }
@@ -968,7 +968,7 @@ int read_main_config_file(char *main_con
 
 			interval_length=atoi(value);
 			if(interval_length<1){
-				asprintf(&error_message,"Illegal value for interval_length");
+				tmp=asprintf(&error_message,"Illegal value for interval_length");
 				error=TRUE;
 				break;
 			        }
@@ -977,7 +977,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"check_external_commands")){
 
 			if(strlen(value)!=1||value[0]<'0'||value[0]>'1'){
-				asprintf(&error_message,"Illegal value for check_external_commands");
+				tmp=asprintf(&error_message,"Illegal value for check_external_commands");
 				error=TRUE;
 				break;
 			        }
@@ -990,7 +990,7 @@ int read_main_config_file(char *main_con
 			command_check_interval_is_seconds=(strstr(value,"s"))?TRUE:FALSE;
 			command_check_interval=atoi(value);
 			if(command_check_interval<-1 || command_check_interval==0){
-				asprintf(&error_message,"Illegal value for command_check_interval");
+				tmp=asprintf(&error_message,"Illegal value for command_check_interval");
 				error=TRUE;
 				break;
 			        }
@@ -999,7 +999,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"check_for_orphaned_services")){
 
 			if(strlen(value)!=1||value[0]<'0'||value[0]>'1'){
-				asprintf(&error_message,"Illegal value for check_for_orphaned_services");
+				tmp=asprintf(&error_message,"Illegal value for check_for_orphaned_services");
 				error=TRUE;
 				break;
 			        }
@@ -1010,7 +1010,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"check_for_orphaned_hosts")){
 
 			if(strlen(value)!=1||value[0]<'0'||value[0]>'1'){
-				asprintf(&error_message,"Illegal value for check_for_orphaned_hosts");
+				tmp=asprintf(&error_message,"Illegal value for check_for_orphaned_hosts");
 				error=TRUE;
 				break;
 			        }
@@ -1021,7 +1021,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"check_service_freshness")){
 
 			if(strlen(value)!=1||value[0]<'0'||value[0]>'1'){
-				asprintf(&error_message,"Illegal value for check_service_freshness");
+				tmp=asprintf(&error_message,"Illegal value for check_service_freshness");
 				error=TRUE;
 				break;
 			        }
@@ -1032,7 +1032,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"check_host_freshness")){
 
 			if(strlen(value)!=1||value[0]<'0'||value[0]>'1'){
-				asprintf(&error_message,"Illegal value for check_host_freshness");
+				tmp=asprintf(&error_message,"Illegal value for check_host_freshness");
 				error=TRUE;
 				break;
 			        }
@@ -1044,7 +1044,7 @@ int read_main_config_file(char *main_con
 
 			service_freshness_check_interval=atoi(value);
 			if(service_freshness_check_interval<=0){
-				asprintf(&error_message,"Illegal value for service_freshness_check_interval");
+				tmp=asprintf(&error_message,"Illegal value for service_freshness_check_interval");
 				error=TRUE;
 				break;
 			        }
@@ -1054,7 +1054,7 @@ int read_main_config_file(char *main_con
 
 			host_freshness_check_interval=atoi(value);
 			if(host_freshness_check_interval<=0){
-				asprintf(&error_message,"Illegal value for host_freshness_check_interval");
+				tmp=asprintf(&error_message,"Illegal value for host_freshness_check_interval");
 				error=TRUE;
 				break;
 			        }
@@ -1062,7 +1062,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"auto_reschedule_checks")){
 
 			if(strlen(value)!=1||value[0]<'0'||value[0]>'1'){
-				asprintf(&error_message,"Illegal value for auto_reschedule_checks");
+				tmp=asprintf(&error_message,"Illegal value for auto_reschedule_checks");
 				error=TRUE;
 				break;
 			        }
@@ -1074,7 +1074,7 @@ int read_main_config_file(char *main_con
 
 			auto_rescheduling_interval=atoi(value);
 			if(auto_rescheduling_interval<=0){
-				asprintf(&error_message,"Illegal value for auto_rescheduling_interval");
+				tmp=asprintf(&error_message,"Illegal value for auto_rescheduling_interval");
 				error=TRUE;
 				break;
 			        }
@@ -1084,7 +1084,7 @@ int read_main_config_file(char *main_con
 
 			auto_rescheduling_window=atoi(value);
 			if(auto_rescheduling_window<=0){
-				asprintf(&error_message,"Illegal value for auto_rescheduling_window");
+				tmp=asprintf(&error_message,"Illegal value for auto_rescheduling_window");
 				error=TRUE;
 				break;
 			        }
@@ -1102,7 +1102,7 @@ int read_main_config_file(char *main_con
 
 			status_update_interval=atoi(value);
 			if(status_update_interval<=1){
-				asprintf(&error_message,"Illegal value for status_update_interval");
+				tmp=asprintf(&error_message,"Illegal value for status_update_interval");
 				error=TRUE;
 				break;
 			        }
@@ -1113,7 +1113,7 @@ int read_main_config_file(char *main_con
 			time_change_threshold=atoi(value);
 
 			if(time_change_threshold<=5){
-				asprintf(&error_message,"Illegal value for time_change_threshold");
+				tmp=asprintf(&error_message,"Illegal value for time_change_threshold");
 				error=TRUE;
 				break;
 			        }
@@ -1132,7 +1132,7 @@ int read_main_config_file(char *main_con
 
 			low_service_flap_threshold=strtod(value,NULL);
 			if(low_service_flap_threshold<=0.0 || low_service_flap_threshold>=100.0){
-				asprintf(&error_message,"Illegal value for low_service_flap_threshold");
+				tmp=asprintf(&error_message,"Illegal value for low_service_flap_threshold");
 				error=TRUE;
 				break;
 			        }
@@ -1142,7 +1142,7 @@ int read_main_config_file(char *main_con
 
 			high_service_flap_threshold=strtod(value,NULL);
 			if(high_service_flap_threshold<=0.0 ||  high_service_flap_threshold>100.0){
-				asprintf(&error_message,"Illegal value for high_service_flap_threshold");
+				tmp=asprintf(&error_message,"Illegal value for high_service_flap_threshold");
 				error=TRUE;
 				break;
 			        }
@@ -1152,7 +1152,7 @@ int read_main_config_file(char *main_con
 
 			low_host_flap_threshold=strtod(value,NULL);
 			if(low_host_flap_threshold<=0.0 || low_host_flap_threshold>=100.0){
-				asprintf(&error_message,"Illegal value for low_host_flap_threshold");
+				tmp=asprintf(&error_message,"Illegal value for low_host_flap_threshold");
 				error=TRUE;
 				break;
 			        }
@@ -1162,7 +1162,7 @@ int read_main_config_file(char *main_con
 
 			high_host_flap_threshold=strtod(value,NULL);
 			if(high_host_flap_threshold<=0.0 || high_host_flap_threshold>100.0){
-				asprintf(&error_message,"Illegal value for high_host_flap_threshold");
+				tmp=asprintf(&error_message,"Illegal value for high_host_flap_threshold");
 				error=TRUE;
 				break;
 			        }
@@ -1188,7 +1188,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"p1_file")){
 
 			if(strlen(value)>MAX_FILENAME_LENGTH-1){
-				asprintf(&error_message,"P1 file is too long");
+				tmp=asprintf(&error_message,"P1 file is too long");
 				error=TRUE;
 				break;
 				}
@@ -1229,7 +1229,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"daemon_dumps_core")){
 
 			if(strlen(value)!=1||value[0]<'0'||value[0]>'1'){
-				asprintf(&error_message,"Illegal value for daemon_dumps_core");
+				tmp=asprintf(&error_message,"Illegal value for daemon_dumps_core");
 				error=TRUE;
 				break;
 				}
@@ -1240,7 +1240,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"use_large_installation_tweaks")){
 
 			if(strlen(value)!=1||value[0]<'0'||value[0]>'1'){
-				asprintf(&error_message,"Illegal value for use_large_installation_tweaks ");
+				tmp=asprintf(&error_message,"Illegal value for use_large_installation_tweaks ");
 				error=TRUE;
 				break;
 			        }
@@ -1260,7 +1260,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"enable_embedded_perl")){
 
 			if(strlen(value)!=1||value[0]<'0'||value[0]>'1'){
-				asprintf(&error_message,"Illegal value for enable_embedded_perl");
+				tmp=asprintf(&error_message,"Illegal value for enable_embedded_perl");
 				error=TRUE;
 				break;
 			        }
@@ -1271,7 +1271,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"use_embedded_perl_implicitly")){
 
 			if(strlen(value)!=1||value[0]<'0'||value[0]>'1'){
-				asprintf(&error_message,"Illegal value for use_embedded_perl_implicitly");
+				tmp=asprintf(&error_message,"Illegal value for use_embedded_perl_implicitly");
 				error=TRUE;
 				break;
 			        }
@@ -1286,7 +1286,7 @@ int read_main_config_file(char *main_con
 		else if(!strcmp(variable,"auth_file")){
 
 			if(strlen(value)>MAX_FILENAME_LENGTH-1){
-				asprintf(&error_message,"Auth file is too long");
+				tmp=asprintf(&error_message,"Auth file is too long");
 				error=TRUE;
 				break;
 			        }
@@ -1327,7 +1327,7 @@ int read_main_config_file(char *main_con
 
 		/* we don't know what this variable is... */
 		else{
-			asprintf(&error_message,"UNKNOWN VARIABLE");
+			tmp=asprintf(&error_message,"UNKNOWN VARIABLE");
 			error=TRUE;
 			break;
 			}
@@ -1488,7 +1488,7 @@ int pre_flight_check(void){
 	struct timeval tv[4];
 	double runtime[4];
 	int temp_path_fd=-1;
-
+	int tmp;
 
 	if(test_scheduling==TRUE)
 		gettimeofday(&tv[0],NULL);
@@ -1604,7 +1604,7 @@ int pre_flight_check(void){
 		printf("Checking misc settings...\n");
 
 	/* check if we can write to temp_path */
-       	asprintf(&buf,"%s/nagiosXXXXXX",temp_path);
+       	tmp=asprintf(&buf,"%s/nagiosXXXXXX",temp_path);
        	if((temp_path_fd=mkstemp(buf))==-1){
 		logit(NSLOG_VERIFICATION_ERROR,TRUE,"\tError: Unable to write to temp_path ('%s') - %s\n",temp_path,strerror(errno));
 		errors++;
@@ -1616,7 +1616,7 @@ int pre_flight_check(void){
 	my_free(buf);
 
 	/* check if we can write to check_result_path */
-       	asprintf(&buf,"%s/nagiosXXXXXX",check_result_path);
+       	tmp=asprintf(&buf,"%s/nagiosXXXXXX",check_result_path);
        	if((temp_path_fd=mkstemp(buf))==-1){
 		logit(NSLOG_VERIFICATION_WARNING,TRUE,"\tError: Unable to write to check_result_path ('%s') - %s\n",check_result_path,strerror(errno));
 		errors++;
--- nagios-3.0.6/base/flapping.c.p11	2008-12-01 03:22:58 +1000
+++ nagios-3.0.6/base/flapping.c	2009-01-12 10:19:30 +1000
@@ -321,7 +321,7 @@ void check_for_host_flapping(host *hst, 
 /* handles a service that is flapping */
 void set_service_flap(service *svc, double percent_change, double high_threshold, double low_threshold, int allow_flapstart_notification){
 	char *temp_buffer=NULL;
-
+	int tmp;
 	log_debug_info(DEBUGL_FUNCTIONS,0,"set_service_flap()\n");
 
 	if(svc==NULL)
@@ -333,7 +333,7 @@ void set_service_flap(service *svc, doub
 	logit(NSLOG_RUNTIME_WARNING,FALSE,"SERVICE FLAPPING ALERT: %s;%s;STARTED; Service appears to have started flapping (%2.1f%% change >= %2.1f%% threshold)\n",svc->host_name,svc->description,percent_change,high_threshold);
 
 	/* add a non-persistent comment to the service */
-	asprintf(&temp_buffer,"Notifications for this service are being suppressed because it was detected as having been flapping between different states (%2.1f%% change >= %2.1f%% threshold).  When the service state stabilizes and the flapping stops, notifications will be re-enabled.",percent_change,high_threshold);
+	tmp=asprintf(&temp_buffer,"Notifications for this service are being suppressed because it was detected as having been flapping between different states (%2.1f%% change >= %2.1f%% threshold).  When the service state stabilizes and the flapping stops, notifications will be re-enabled.",percent_change,high_threshold);
 	add_new_service_comment(FLAPPING_COMMENT,svc->host_name,svc->description,time(NULL),"(Nagios Process)",temp_buffer,0,COMMENTSOURCE_INTERNAL,FALSE,(time_t)0,&(svc->flapping_comment_id));
 	my_free(temp_buffer);
 
@@ -402,7 +402,7 @@ void clear_service_flap(service *svc, do
 /* handles a host that is flapping */
 void set_host_flap(host *hst, double percent_change, double high_threshold, double low_threshold, int allow_flapstart_notification){
 	char *temp_buffer=NULL;
-
+	int tmp;
 	log_debug_info(DEBUGL_FUNCTIONS,0,"set_host_flap()\n");
 
 	if(hst==NULL)
@@ -414,7 +414,7 @@ void set_host_flap(host *hst, double per
 	logit(NSLOG_RUNTIME_WARNING,FALSE,"HOST FLAPPING ALERT: %s;STARTED; Host appears to have started flapping (%2.1f%% change > %2.1f%% threshold)\n",hst->name,percent_change,high_threshold);
 
 	/* add a non-persistent comment to the host */
-	asprintf(&temp_buffer,"Notifications for this host are being suppressed because it was detected as having been flapping between different states (%2.1f%% change > %2.1f%% threshold).  When the host state stabilizes and the flapping stops, notifications will be re-enabled.",percent_change,high_threshold);
+	tmp=asprintf(&temp_buffer,"Notifications for this host are being suppressed because it was detected as having been flapping between different states (%2.1f%% change > %2.1f%% threshold).  When the host state stabilizes and the flapping stops, notifications will be re-enabled.",percent_change,high_threshold);
 	add_new_host_comment(FLAPPING_COMMENT,hst->name,time(NULL),"(Nagios Process)",temp_buffer,0,COMMENTSOURCE_INTERNAL,FALSE,(time_t)0,&(hst->flapping_comment_id));
 	my_free(temp_buffer);
 
--- nagios-3.0.6/base/logging.c.p11	2008-12-01 03:22:58 +1000
+++ nagios-3.0.6/base/logging.c	2009-01-12 10:19:30 +1000
@@ -233,7 +233,7 @@ int log_service_event(service *svc){
 	char *processed_buffer=NULL;
 	unsigned long log_options=0L;
 	host *temp_host=NULL;
-
+	int tmp;
 	/* don't log soft errors if the user doesn't want to */
 	if(svc->state_type==SOFT_STATE && !log_service_retries)
 		return OK;
@@ -257,7 +257,7 @@ int log_service_event(service *svc){
 	grab_host_macros(temp_host);
 	grab_service_macros(svc);
 
-	asprintf(&temp_buffer,"SERVICE ALERT: %s;%s;$SERVICESTATE$;$SERVICESTATETYPE$;$SERVICEATTEMPT$;%s\n",svc->host_name,svc->description,(svc->plugin_output==NULL)?"":svc->plugin_output);
+	tmp=asprintf(&temp_buffer,"SERVICE ALERT: %s;%s;$SERVICESTATE$;$SERVICESTATETYPE$;$SERVICEATTEMPT$;%s\n",svc->host_name,svc->description,(svc->plugin_output==NULL)?"":svc->plugin_output);
 	process_macros(temp_buffer,&processed_buffer,0);
 
 	write_to_all_logs(processed_buffer,log_options);
@@ -274,7 +274,7 @@ int log_host_event(host *hst){
 	char *temp_buffer=NULL;
 	char *processed_buffer=NULL;
 	unsigned long log_options=0L;
-
+	int tmp;
 	/* grab the host macros */
 	clear_volatile_macros();
 	grab_host_macros(hst);
@@ -288,7 +288,7 @@ int log_host_event(host *hst){
 		log_options=NSLOG_HOST_UP;
 
 
-	asprintf(&temp_buffer,"HOST ALERT: %s;$HOSTSTATE$;$HOSTSTATETYPE$;$HOSTATTEMPT$;%s\n",hst->name,(hst->plugin_output==NULL)?"":hst->plugin_output);
+	tmp=asprintf(&temp_buffer,"HOST ALERT: %s;$HOSTSTATE$;$HOSTSTATETYPE$;$HOSTATTEMPT$;%s\n",hst->name,(hst->plugin_output==NULL)?"":hst->plugin_output);
 	process_macros(temp_buffer,&processed_buffer,0);
 
 	write_to_all_logs(processed_buffer,log_options);
@@ -305,7 +305,7 @@ int log_host_states(int type, time_t *ti
 	char *temp_buffer=NULL;
 	char *processed_buffer=NULL;
 	host *temp_host=NULL;;
-
+	int tmp;
 	/* bail if we shouldn't be logging initial states */
 	if(type==INITIAL_STATES && log_initial_states==FALSE)
 		return OK;
@@ -316,7 +316,7 @@ int log_host_states(int type, time_t *ti
 		clear_volatile_macros();
 		grab_host_macros(temp_host);
 
-		asprintf(&temp_buffer,"%s HOST STATE: %s;$HOSTSTATE$;$HOSTSTATETYPE$;$HOSTATTEMPT$;%s\n",(type==INITIAL_STATES)?"INITIAL":"CURRENT",temp_host->name,(temp_host->plugin_output==NULL)?"":temp_host->plugin_output);
+		tmp=asprintf(&temp_buffer,"%s HOST STATE: %s;$HOSTSTATE$;$HOSTSTATETYPE$;$HOSTATTEMPT$;%s\n",(type==INITIAL_STATES)?"INITIAL":"CURRENT",temp_host->name,(temp_host->plugin_output==NULL)?"":temp_host->plugin_output);
 		process_macros(temp_buffer,&processed_buffer,0);
 		
 		write_to_all_logs_with_timestamp(processed_buffer,NSLOG_INFO_MESSAGE,timestamp);
@@ -335,7 +335,7 @@ int log_service_states(int type, time_t 
 	char *processed_buffer=NULL;
 	service *temp_service=NULL;
 	host *temp_host=NULL;;
-
+	int tmp;
 	/* bail if we shouldn't be logging initial states */
 	if(type==INITIAL_STATES && log_initial_states==FALSE)
 		return OK;
@@ -351,7 +351,7 @@ int log_service_states(int type, time_t 
 		grab_host_macros(temp_host);
 		grab_service_macros(temp_service);
 
-		asprintf(&temp_buffer,"%s SERVICE STATE: %s;%s;$SERVICESTATE$;$SERVICESTATETYPE$;$SERVICEATTEMPT$;%s\n",(type==INITIAL_STATES)?"INITIAL":"CURRENT",temp_service->host_name,temp_service->description,temp_service->plugin_output);
+		tmp=asprintf(&temp_buffer,"%s SERVICE STATE: %s;%s;$SERVICESTATE$;$SERVICESTATETYPE$;$SERVICEATTEMPT$;%s\n",(type==INITIAL_STATES)?"INITIAL":"CURRENT",temp_service->host_name,temp_service->description,temp_service->plugin_output);
 		process_macros(temp_buffer,&processed_buffer,0);
 
 		write_to_all_logs_with_timestamp(processed_buffer,NSLOG_INFO_MESSAGE,timestamp);
@@ -370,7 +370,7 @@ int rotate_log_file(time_t rotation_time
 	char method_string[16]="";
 	char *log_archive=NULL;
 	struct tm *t;
-	int rename_result=0;
+	int rename_result=0,tmp;
 
 	if(log_rotation_method==LOG_ROTATION_NONE){
 		return OK;
@@ -393,7 +393,7 @@ int rotate_log_file(time_t rotation_time
 	t=localtime(&rotation_time);
 
 	/* get the archived filename to use */
-	asprintf(&log_archive,"%s%snagios-%02d-%02d-%d-%02d.log",log_archive_path,(log_archive_path[strlen(log_archive_path)-1]=='/')?"":"/",t->tm_mon+1,t->tm_mday,t->tm_year+1900,t->tm_hour);
+	tmp=asprintf(&log_archive,"%s%snagios-%02d-%02d-%d-%02d.log",log_archive_path,(log_archive_path[strlen(log_archive_path)-1]=='/')?"":"/",t->tm_mon+1,t->tm_mday,t->tm_year+1900,t->tm_hour);
 
 	/* rotate the log file */
 	rename_result=my_rename(log_file,log_archive);
@@ -412,7 +412,7 @@ int rotate_log_file(time_t rotation_time
 #endif
 
 	/* record the log rotation after it has been done... */
-	asprintf(&temp_buffer,"LOG ROTATION: %s\n",method_string);
+	tmp=asprintf(&temp_buffer,"LOG ROTATION: %s\n",method_string);
 	write_to_all_logs_with_timestamp(temp_buffer,NSLOG_PROCESS_INFO,&rotation_time);
 	my_free(temp_buffer);
 
@@ -433,9 +433,9 @@ int rotate_log_file(time_t rotation_time
 /* record log file version/info */
 int write_log_file_info(time_t *timestamp){
 	char *temp_buffer=NULL;
-
+	int tmp;
 	/* write log version */
-	asprintf(&temp_buffer,"LOG VERSION: %s\n",LOG_VERSION_2);
+	tmp=asprintf(&temp_buffer,"LOG VERSION: %s\n",LOG_VERSION_2);
 	write_to_all_logs_with_timestamp(temp_buffer,NSLOG_PROCESS_INFO,timestamp);
 	my_free(temp_buffer);
 
@@ -478,7 +478,7 @@ int log_debug_info(int level, int verbos
 	va_list ap;
 	char *temp_path=NULL;
 	struct timeval current_time;
-
+	int tmp;
 	if(!(debug_level==DEBUGL_ALL || (level & debug_level)))
 		return OK;
 
@@ -507,7 +507,7 @@ int log_debug_info(int level, int verbos
 		close_debug_log();
 		
 		/* rotate the log file */
-		asprintf(&temp_path,"%s.old",debug_file);
+		tmp=asprintf(&temp_path,"%s.old",debug_file);
 		if(temp_path){
 
 			/* unlink the old debug file */
--- nagios-3.0.6/base/nagios.c.p11	2008-12-02 13:48:17 +1000
+++ nagios-3.0.6/base/nagios.c	2009-01-12 10:19:30 +1000
@@ -280,7 +280,7 @@ int main(int argc, char **argv){
 	struct tm *tm;
 	time_t now;
 	char datestring[256];
-
+	int tmp;
 
 
 #ifdef HAVE_GETOPT_H
@@ -449,7 +449,7 @@ int main(int argc, char **argv){
 		        }
 
 		/* get absolute path of current working directory */
-		getcwd(config_file,MAX_FILENAME_LENGTH);
+		tmp=(int)getcwd(config_file,MAX_FILENAME_LENGTH);
 
 		/* append a forward slash */
 		strncat(config_file,"/",1);
@@ -614,7 +614,7 @@ int main(int argc, char **argv){
 			/* get program (re)start time and save as macro */
 			program_start=time(NULL);
 			my_free(macro_x[MACRO_PROCESSSTARTTIME]);
-			asprintf(&macro_x[MACRO_PROCESSSTARTTIME],"%lu",(unsigned long)program_start);
+			tmp=asprintf(&macro_x[MACRO_PROCESSSTARTTIME],"%lu",(unsigned long)program_start);
 
 			/* open debug log */
 			open_debug_log();
@@ -641,7 +641,7 @@ int main(int argc, char **argv){
 			now=time(NULL);
 			tm=localtime(&now);
 			strftime(datestring,sizeof(datestring),"%a %b %d %H:%M:%S %Z %Y",tm);
-			asprintf(&buffer,"Local time is %s\n",datestring);
+			tmp=asprintf(&buffer,"Local time is %s\n",datestring);
 			write_to_logs_and_console(buffer,NSLOG_PROCESS_INFO,TRUE);
 			my_free(buffer);
 
@@ -729,7 +729,7 @@ int main(int argc, char **argv){
 
 				daemon_init();
 
-				asprintf(&buffer,"Finished daemonizing... (New PID=%d)\n",(int)getpid());
+				tmp=asprintf(&buffer,"Finished daemonizing... (New PID=%d)\n",(int)getpid());
 				write_to_all_logs(buffer,NSLOG_PROCESS_INFO);
 				my_free(buffer);
 
@@ -792,7 +792,7 @@ int main(int argc, char **argv){
 			/* get event start time and save as macro */
 			event_start=time(NULL);
 			my_free(macro_x[MACRO_EVENTSTARTTIME]);
-			asprintf(&macro_x[MACRO_EVENTSTARTTIME],"%lu",(unsigned long)event_start);
+			tmp=asprintf(&macro_x[MACRO_EVENTSTARTTIME],"%lu",(unsigned long)event_start);
 
 		        /***** start monitoring all services *****/
 			/* (doesn't return until a restart or shutdown signal is encountered) */
@@ -804,9 +804,9 @@ int main(int argc, char **argv){
 			if(caught_signal==TRUE){
 
 				if(sig_id==SIGHUP)
-					asprintf(&buffer,"Caught SIGHUP, restarting...\n");
+					tmp=asprintf(&buffer,"Caught SIGHUP, restarting...\n");
 				else if(sig_id!=SIGSEGV)
-					asprintf(&buffer,"Caught SIG%s, shutting down...\n",sigs[sig_id]);
+					tmp=asprintf(&buffer,"Caught SIG%s, shutting down...\n",sigs[sig_id]);
 
 				write_to_all_logs(buffer,NSLOG_PROCESS_INFO);
 				my_free(buffer);
--- nagios-3.0.6/base/nagiostats.c.p11	2008-12-02 13:48:17 +1000
+++ nagios-3.0.6/base/nagiostats.c	2009-01-12 10:19:30 +1000
@@ -206,6 +206,7 @@ int read_config_file(void);
 int read_status_file(void);
 void strip(char *);
 void get_time_breakdown(unsigned long,int *,int *,int *,int *);
+int read_nagiostats_file(void);
 
 
 int main(int argc, char **argv){
@@ -1373,12 +1374,12 @@ int read_status_file(void){
 int read_nagiostats_file(void){
 	char temp_buffer[MAX_INPUT_BUFFER];
 	FILE *fp=NULL;
-	int data_type=STATUS_NO_DATA;
+	/* int data_type=STATUS_NO_DATA; */
 	char *var=NULL;
 	char *val=NULL;
 	char *temp_ptr=NULL;
 	time_t current_time;
-	unsigned long time_difference=0L;
+	/* unsigned long time_difference=0L; */
 
 	time(&current_time);
 
--- nagios-3.0.6/base/nebmods.c.p11	2008-12-01 03:22:58 +1000
+++ nagios-3.0.6/base/nebmods.c	2009-01-12 10:19:30 +1000
@@ -171,7 +171,7 @@ int neb_load_module(nebmodule *mod){
 	int source_fd=-1;
 	char buffer[MAX_INPUT_BUFFER]={0};
 	int bytes_read=0;
-	int result=OK;
+	int result=OK,tmp;
 
 	if(mod==NULL || mod->filename==NULL)
 		return ERROR;
@@ -199,7 +199,7 @@ int neb_load_module(nebmodule *mod){
 	************/
 
 	/* open a temp file for copying the module */
-	asprintf(&output_file,"%s/nebmodXXXXXX",temp_path);
+	tmp=asprintf(&output_file,"%s/nebmodXXXXXX",temp_path);
 	if((dest_fd=mkstemp(output_file))==-1){
 		logit(NSLOG_RUNTIME_ERROR,FALSE,"Error: Could not safely copy module '%s'.  The module will not be loaded: %s\n",mod->filename,strerror(errno));
 		return ERROR;
@@ -207,7 +207,7 @@ int neb_load_module(nebmodule *mod){
 	/* open module file for reading and copy it */
 	if((source_fd=open(mod->filename,O_RDONLY,0644))>0){
 		while((bytes_read=read(source_fd,buffer,sizeof(buffer)))>0)
-			write(dest_fd,buffer,bytes_read);
+			tmp=write(dest_fd,buffer,bytes_read);
 		close(source_fd);
 		close(dest_fd);
 		}
--- nagios-3.0.6/base/notifications.c.p11	2008-12-01 03:22:58 +1000
+++ nagios-3.0.6/base/notifications.c	2009-01-12 10:19:30 +1000
@@ -68,7 +68,7 @@ int service_notification(service *svc, i
 	int escalated=FALSE;
 	int result=OK;
 	int contacts_notified=0;
-	int increment_notification_number=FALSE;
+	int increment_notification_number=FALSE,tmp;
 
 	log_debug_info(DEBUGL_FUNCTIONS,0,"service_notification()\n");
 
@@ -196,7 +196,7 @@ int service_notification(service *svc, i
 
 		/* set the notification number macro */
 		my_free(macro_x[MACRO_SERVICENOTIFICATIONNUMBER]);
-		asprintf(&macro_x[MACRO_SERVICENOTIFICATIONNUMBER],"%d",svc->current_notification_number);
+		tmp=asprintf(&macro_x[MACRO_SERVICENOTIFICATIONNUMBER],"%d",svc->current_notification_number);
 
 		/* the $NOTIFICATIONNUMBER$ macro is maintained for backward compatability */
 		my_free(macro_x[MACRO_NOTIFICATIONNUMBER]);
@@ -204,7 +204,7 @@ int service_notification(service *svc, i
 
 		/* set the notification id macro */
 		my_free(macro_x[MACRO_SERVICENOTIFICATIONID]);
-		asprintf(&macro_x[MACRO_SERVICENOTIFICATIONID],"%lu",svc->current_notification_id);
+		tmp=asprintf(&macro_x[MACRO_SERVICENOTIFICATIONID],"%lu",svc->current_notification_id);
 
 		/* notify each contact (duplicates have been removed) */
 		for(temp_notification=notification_list;temp_notification!=NULL;temp_notification=temp_notification->next){
@@ -652,7 +652,7 @@ int notify_contact_of_service(contact *c
 	struct timeval start_time,end_time;
 	struct timeval method_start_time,method_end_time;
 	int macro_options=STRIP_ILLEGAL_MACRO_CHARS|ESCAPE_MACRO_CHARS;
-
+	int tmp;
 
 	log_debug_info(DEBUGL_FUNCTIONS,0,"notify_contact_of_service()\n");
 	log_debug_info(DEBUGL_NOTIFICATIONS,2,"** Attempting to notifying contact '%s'...\n",cntct->name);
@@ -711,31 +711,31 @@ int notify_contact_of_service(contact *c
 		if(log_notifications==TRUE){
 			switch(type){
 			case NOTIFICATION_CUSTOM:
-				asprintf(&temp_buffer,"SERVICE NOTIFICATION: %s;%s;%s;CUSTOM ($SERVICESTATE$);%s;$SERVICEOUTPUT$;$NOTIFICATIONAUTHOR$;$NOTIFICATIONCOMMENT$\n",cntct->name,svc->host_name,svc->description,command_name_ptr);
+				tmp=asprintf(&temp_buffer,"SERVICE NOTIFICATION: %s;%s;%s;CUSTOM ($SERVICESTATE$);%s;$SERVICEOUTPUT$;$NOTIFICATIONAUTHOR$;$NOTIFICATIONCOMMENT$\n",cntct->name,svc->host_name,svc->description,command_name_ptr);
 				break;
 			case NOTIFICATION_ACKNOWLEDGEMENT:
-				asprintf(&temp_buffer,"SERVICE NOTIFICATION: %s;%s;%s;ACKNOWLEDGEMENT ($SERVICESTATE$);%s;$SERVICEOUTPUT$;$NOTIFICATIONAUTHOR$;$NOTIFICATIONCOMMENT$\n",cntct->name,svc->host_name,svc->description,command_name_ptr);
+				tmp=asprintf(&temp_buffer,"SERVICE NOTIFICATION: %s;%s;%s;ACKNOWLEDGEMENT ($SERVICESTATE$);%s;$SERVICEOUTPUT$;$NOTIFICATIONAUTHOR$;$NOTIFICATIONCOMMENT$\n",cntct->name,svc->host_name,svc->description,command_name_ptr);
 				break;
 			case NOTIFICATION_FLAPPINGSTART:
-				asprintf(&temp_buffer,"SERVICE NOTIFICATION: %s;%s;%s;FLAPPINGSTART ($SERVICESTATE$);%s;$SERVICEOUTPUT$\n",cntct->name,svc->host_name,svc->description,command_name_ptr);
+				tmp=asprintf(&temp_buffer,"SERVICE NOTIFICATION: %s;%s;%s;FLAPPINGSTART ($SERVICESTATE$);%s;$SERVICEOUTPUT$\n",cntct->name,svc->host_name,svc->description,command_name_ptr);
 				break;
 			case NOTIFICATION_FLAPPINGSTOP:
-				asprintf(&temp_buffer,"SERVICE NOTIFICATION: %s;%s;%s;FLAPPINGSTOP ($SERVICESTATE$);%s;$SERVICEOUTPUT$\n",cntct->name,svc->host_name,svc->description,command_name_ptr);
+				tmp=asprintf(&temp_buffer,"SERVICE NOTIFICATION: %s;%s;%s;FLAPPINGSTOP ($SERVICESTATE$);%s;$SERVICEOUTPUT$\n",cntct->name,svc->host_name,svc->description,command_name_ptr);
 				break;
 			case NOTIFICATION_FLAPPINGDISABLED:
-				asprintf(&temp_buffer,"SERVICE NOTIFICATION: %s;%s;%s;FLAPPINGDISABLED ($SERVICESTATE$);%s;$SERVICEOUTPUT$\n",cntct->name,svc->host_name,svc->description,command_name_ptr);
+				tmp=asprintf(&temp_buffer,"SERVICE NOTIFICATION: %s;%s;%s;FLAPPINGDISABLED ($SERVICESTATE$);%s;$SERVICEOUTPUT$\n",cntct->name,svc->host_name,svc->description,command_name_ptr);
 				break;
 			case NOTIFICATION_DOWNTIMESTART:
-				asprintf(&temp_buffer,"SERVICE NOTIFICATION: %s;%s;%s;DOWNTIMESTART ($SERVICESTATE$);%s;$SERVICEOUTPUT$\n",cntct->name,svc->host_name,svc->description,command_name_ptr);
+				tmp=asprintf(&temp_buffer,"SERVICE NOTIFICATION: %s;%s;%s;DOWNTIMESTART ($SERVICESTATE$);%s;$SERVICEOUTPUT$\n",cntct->name,svc->host_name,svc->description,command_name_ptr);
 				break;
 			case NOTIFICATION_DOWNTIMEEND:
-				asprintf(&temp_buffer,"SERVICE NOTIFICATION: %s;%s;%s;DOWNTIMEEND ($SERVICESTATE$);%s;$SERVICEOUTPUT$\n",cntct->name,svc->host_name,svc->description,command_name_ptr);
+				tmp=asprintf(&temp_buffer,"SERVICE NOTIFICATION: %s;%s;%s;DOWNTIMEEND ($SERVICESTATE$);%s;$SERVICEOUTPUT$\n",cntct->name,svc->host_name,svc->description,command_name_ptr);
 				break;
 			case NOTIFICATION_DOWNTIMECANCELLED:
-				asprintf(&temp_buffer,"SERVICE NOTIFICATION: %s;%s;%s;DOWNTIMECANCELLED ($SERVICESTATE$);%s;$SERVICEOUTPUT$\n",cntct->name,svc->host_name,svc->description,command_name_ptr);
+				tmp=asprintf(&temp_buffer,"SERVICE NOTIFICATION: %s;%s;%s;DOWNTIMECANCELLED ($SERVICESTATE$);%s;$SERVICEOUTPUT$\n",cntct->name,svc->host_name,svc->description,command_name_ptr);
 				break;
 			default:
-				asprintf(&temp_buffer,"SERVICE NOTIFICATION: %s;%s;%s;$SERVICESTATE$;%s;$SERVICEOUTPUT$\n",cntct->name,svc->host_name,svc->description,command_name_ptr);
+				tmp=asprintf(&temp_buffer,"SERVICE NOTIFICATION: %s;%s;%s;$SERVICESTATE$;%s;$SERVICEOUTPUT$\n",cntct->name,svc->host_name,svc->description,command_name_ptr);
 				break;
 				}
 
@@ -866,7 +866,7 @@ int create_notification_list_from_servic
 	contact *temp_contact=NULL;
 	contactgroupsmember *temp_contactgroupsmember=NULL;
 	contactgroup *temp_contactgroup=NULL;
-	int escalate_notification=FALSE;
+	int escalate_notification=FALSE,tmp;
 	void *ptr=NULL;
 
 	log_debug_info(DEBUGL_FUNCTIONS,0,"create_notification_list_from_service()\n");
@@ -879,7 +879,7 @@ int create_notification_list_from_servic
 
 	/* set the escalation macro */
 	my_free(macro_x[MACRO_NOTIFICATIONISESCALATED]);
-	asprintf(&macro_x[MACRO_NOTIFICATIONISESCALATED],"%d",escalate_notification);
+	tmp=asprintf(&macro_x[MACRO_NOTIFICATIONISESCALATED],"%d",escalate_notification);
 
 	if(options & NOTIFICATION_OPTION_BROADCAST)
 		log_debug_info(DEBUGL_NOTIFICATIONS,1,"This notification will be BROADCAST to all (escalated and normal) contacts...\n");
@@ -968,7 +968,7 @@ int host_notification(host *hst, int typ
 	int escalated=FALSE;
 	int result=OK;
 	int contacts_notified=0;
-	int increment_notification_number=FALSE;
+	int increment_notification_number=FALSE,tmp;
 
 	/* clear volatile macros */
 	clear_volatile_macros();
@@ -1088,7 +1088,7 @@ int host_notification(host *hst, int typ
 
 		/* set the notification number macro */
 		my_free(macro_x[MACRO_HOSTNOTIFICATIONNUMBER]);
-		asprintf(&macro_x[MACRO_HOSTNOTIFICATIONNUMBER],"%d",hst->current_notification_number);
+		tmp=asprintf(&macro_x[MACRO_HOSTNOTIFICATIONNUMBER],"%d",hst->current_notification_number);
 
 		/* the $NOTIFICATIONNUMBER$ macro is maintained for backward compatability */
 		my_free(macro_x[MACRO_NOTIFICATIONNUMBER]);
@@ -1096,7 +1096,7 @@ int host_notification(host *hst, int typ
 
 		/* set the notification id macro */
 		my_free(macro_x[MACRO_HOSTNOTIFICATIONID]);
-		asprintf(&macro_x[MACRO_HOSTNOTIFICATIONID],"%lu",hst->current_notification_id);
+		tmp=asprintf(&macro_x[MACRO_HOSTNOTIFICATIONID],"%lu",hst->current_notification_id);
 
 		/* notify each contact (duplicates have been removed) */
 		for(temp_notification=notification_list;temp_notification!=NULL;temp_notification=temp_notification->next){
@@ -1511,7 +1511,7 @@ int notify_contact_of_host(contact *cntc
 	struct timeval method_start_time;
 	struct timeval method_end_time;
 	int macro_options=STRIP_ILLEGAL_MACRO_CHARS|ESCAPE_MACRO_CHARS;
-
+	int tmp;
 
 	log_debug_info(DEBUGL_FUNCTIONS,0,"notify_contact_of_host()\n");
 	log_debug_info(DEBUGL_NOTIFICATIONS,2,"** Attempting to notifying contact '%s'...\n",cntct->name);
@@ -1570,31 +1570,31 @@ int notify_contact_of_host(contact *cntc
 		if(log_notifications==TRUE){
 			switch(type){
 			case NOTIFICATION_CUSTOM:
-				asprintf(&temp_buffer,"HOST NOTIFICATION: %s;%s;CUSTOM ($HOSTSTATE$);%s;$HOSTOUTPUT$;$NOTIFICATIONAUTHOR$;$NOTIFICATIONCOMMENT$\n",cntct->name,hst->name,command_name_ptr);
+				tmp=asprintf(&temp_buffer,"HOST NOTIFICATION: %s;%s;CUSTOM ($HOSTSTATE$);%s;$HOSTOUTPUT$;$NOTIFICATIONAUTHOR$;$NOTIFICATIONCOMMENT$\n",cntct->name,hst->name,command_name_ptr);
 				break;
 			case NOTIFICATION_ACKNOWLEDGEMENT:
-				asprintf(&temp_buffer,"HOST NOTIFICATION: %s;%s;ACKNOWLEDGEMENT ($HOSTSTATE$);%s;$HOSTOUTPUT$;$NOTIFICATIONAUTHOR$;$NOTIFICATIONCOMMENT$\n",cntct->name,hst->name,command_name_ptr);
+				tmp=asprintf(&temp_buffer,"HOST NOTIFICATION: %s;%s;ACKNOWLEDGEMENT ($HOSTSTATE$);%s;$HOSTOUTPUT$;$NOTIFICATIONAUTHOR$;$NOTIFICATIONCOMMENT$\n",cntct->name,hst->name,command_name_ptr);
 				break;
 			case NOTIFICATION_FLAPPINGSTART:
-				asprintf(&temp_buffer,"HOST NOTIFICATION: %s;%s;FLAPPINGSTART ($HOSTSTATE$);%s;$HOSTOUTPUT$\n",cntct->name,hst->name,command_name_ptr);
+				tmp=asprintf(&temp_buffer,"HOST NOTIFICATION: %s;%s;FLAPPINGSTART ($HOSTSTATE$);%s;$HOSTOUTPUT$\n",cntct->name,hst->name,command_name_ptr);
 				break;
 			case NOTIFICATION_FLAPPINGSTOP:
-				asprintf(&temp_buffer,"HOST NOTIFICATION: %s;%s;FLAPPINGSTOP ($HOSTSTATE$);%s;$HOSTOUTPUT$\n",cntct->name,hst->name,command_name_ptr);
+				tmp=asprintf(&temp_buffer,"HOST NOTIFICATION: %s;%s;FLAPPINGSTOP ($HOSTSTATE$);%s;$HOSTOUTPUT$\n",cntct->name,hst->name,command_name_ptr);
 				break;
 			case NOTIFICATION_FLAPPINGDISABLED:
-				asprintf(&temp_buffer,"HOST NOTIFICATION: %s;%s;FLAPPINGDISABLED ($HOSTSTATE$);%s;$HOSTOUTPUT$\n",cntct->name,hst->name,command_name_ptr);
+				tmp=asprintf(&temp_buffer,"HOST NOTIFICATION: %s;%s;FLAPPINGDISABLED ($HOSTSTATE$);%s;$HOSTOUTPUT$\n",cntct->name,hst->name,command_name_ptr);
 				break;
 			case NOTIFICATION_DOWNTIMESTART:
-				asprintf(&temp_buffer,"HOST NOTIFICATION: %s;%s;DOWNTIMESTART ($HOSTSTATE$);%s;$HOSTOUTPUT$\n",cntct->name,hst->name,command_name_ptr);
+				tmp=asprintf(&temp_buffer,"HOST NOTIFICATION: %s;%s;DOWNTIMESTART ($HOSTSTATE$);%s;$HOSTOUTPUT$\n",cntct->name,hst->name,command_name_ptr);
 				break;
 			case NOTIFICATION_DOWNTIMEEND:
-				asprintf(&temp_buffer,"HOST NOTIFICATION: %s;%s;DOWNTIMEEND ($HOSTSTATE$);%s;$HOSTOUTPUT$\n",cntct->name,hst->name,command_name_ptr);
+				tmp=asprintf(&temp_buffer,"HOST NOTIFICATION: %s;%s;DOWNTIMEEND ($HOSTSTATE$);%s;$HOSTOUTPUT$\n",cntct->name,hst->name,command_name_ptr);
 				break;
 			case NOTIFICATION_DOWNTIMECANCELLED:
-				asprintf(&temp_buffer,"HOST NOTIFICATION: %s;%s;DOWNTIMECANCELLED ($HOSTSTATE$);%s;$HOSTOUTPUT$\n",cntct->name,hst->name,command_name_ptr);
+				tmp=asprintf(&temp_buffer,"HOST NOTIFICATION: %s;%s;DOWNTIMECANCELLED ($HOSTSTATE$);%s;$HOSTOUTPUT$\n",cntct->name,hst->name,command_name_ptr);
 				break;
 			default:
-				asprintf(&temp_buffer,"HOST NOTIFICATION: %s;%s;$HOSTSTATE$;%s;$HOSTOUTPUT$\n",cntct->name,hst->name,command_name_ptr);
+				tmp=asprintf(&temp_buffer,"HOST NOTIFICATION: %s;%s;$HOSTSTATE$;%s;$HOSTOUTPUT$\n",cntct->name,hst->name,command_name_ptr);
 				break;
 				}
 
@@ -1725,7 +1725,7 @@ int create_notification_list_from_host(h
 	contact *temp_contact=NULL;
 	contactgroupsmember *temp_contactgroupsmember=NULL;
 	contactgroup *temp_contactgroup=NULL;
-	int escalate_notification=FALSE;
+	int escalate_notification=FALSE,tmp;
 	void *ptr=NULL;
 
 	log_debug_info(DEBUGL_FUNCTIONS,0,"create_notification_list_from_host()\n");
@@ -1738,7 +1738,7 @@ int create_notification_list_from_host(h
 
 	/* set the escalation macro */
 	my_free(macro_x[MACRO_NOTIFICATIONISESCALATED]);
-	asprintf(&macro_x[MACRO_NOTIFICATIONISESCALATED],"%d",escalate_notification);
+	tmp=asprintf(&macro_x[MACRO_NOTIFICATIONISESCALATED],"%d",escalate_notification);
 
 	if(options & NOTIFICATION_OPTION_BROADCAST)
 		log_debug_info(DEBUGL_NOTIFICATIONS,1,"This notification will be BROADCAST to all (escalated and normal) contacts...\n");
--- nagios-3.0.6/base/utils.c.p11	2008-12-01 03:22:58 +1000
+++ nagios-3.0.6/base/utils.c	2009-01-12 10:19:30 +1000
@@ -298,8 +298,8 @@ int my_system(char *cmd,int timeout,int 
 #ifdef EMBEDDEDPERL
 	char fname[512]="";
 	char *args[5]={"",DO_CLEAN, "", "", NULL };
-	SV *plugin_hndlr_cr;
-	STRLEN n_a ;
+	SV *plugin_hndlr_cr=NULL;
+	/* STRLEN n_a ; */
 	char *perl_output=NULL;
 	int count;
 	int use_epn=FALSE;
@@ -308,7 +308,7 @@ int my_system(char *cmd,int timeout,int 
 #endif
 	dSP;
 #endif
-
+	int tmp;
 
 	log_debug_info(DEBUGL_FUNCTIONS,0,"my_system()\n");
 
@@ -367,7 +367,7 @@ int my_system(char *cmd,int timeout,int 
 			 */
 			(void) POPs ;
 
-			asprintf(&temp_buffer,"%s", SvPVX(ERRSV));
+			tmp=asprintf(&temp_buffer,"%s", SvPVX(ERRSV));
 
 			log_debug_info(DEBUGL_COMMANDS,0,"Embedded perl failed to compile %s, compile error %s\n",fname,temp_buffer);
 
@@ -390,7 +390,7 @@ int my_system(char *cmd,int timeout,int 
 #endif 
 
 	/* create a pipe */
-	pipe(fd);
+	tmp=pipe(fd);
 
 	/* make the pipe non-blocking */
 	fcntl(fd[0],F_SETFL,O_NONBLOCK);
@@ -479,7 +479,7 @@ int my_system(char *cmd,int timeout,int 
 			log_debug_info(DEBUGL_COMMANDS,0,"Embedded perl ran command %s with output %d, %s\n",fname,status,buffer);
 
 			/* write the output back to the parent process */
-			write(fd[1],buffer,strlen(buffer)+1);
+			tmp=write(fd[1],buffer,strlen(buffer)+1);
 
 			/* close pipe for writing */
 			close(fd[1]);
@@ -503,7 +503,7 @@ int my_system(char *cmd,int timeout,int 
 			buffer[sizeof(buffer)-1]='\x0';
 
 			/* write the error back to the parent process */
-			write(fd[1],buffer,strlen(buffer)+1);
+			tmp=write(fd[1],buffer,strlen(buffer)+1);
 
 			result=STATE_CRITICAL;
 		        }
@@ -511,7 +511,7 @@ int my_system(char *cmd,int timeout,int 
 
 			/* write all the lines of output back to the parent process */
 			while(fgets(buffer,sizeof(buffer)-1,fp))
-				write(fd[1],buffer,strlen(buffer));
+				tmp=write(fd[1],buffer,strlen(buffer));
 
 			/* close the command and get termination status */
 			status=pclose(fp);
@@ -1959,7 +1959,7 @@ int daemon_init(void){
 	char buf[256];
 	struct flock lock;
 	char *homedir=NULL;
-
+	int tmp;
 #ifdef RLIMIT_CORE
 	struct rlimit limit;
 #endif
@@ -1967,9 +1967,9 @@ int daemon_init(void){
 	/* change working directory. scuttle home if we're dumping core */
 	homedir=getenv("HOME");
 	if(daemon_dumps_core==TRUE && homedir!=NULL)
-		chdir(homedir);
+		tmp=chdir(homedir);
 	else
-		chdir("/");
+		tmp=chdir("/");
 
 	umask(S_IWGRP|S_IWOTH);
 
@@ -2046,9 +2046,9 @@ int daemon_init(void){
 
 	/* write PID to lockfile... */
 	lseek(lockfile,0,SEEK_SET);
-	ftruncate(lockfile,0);
+	tmp=ftruncate(lockfile,0);
 	sprintf(buf,"%d\n",(int)getpid());
-	write(lockfile,buf,strlen(buf));
+	tmp=write(lockfile,buf,strlen(buf));
 
 	/* make sure lock file stays open while program is executing... */
 	val=fcntl(lockfile,F_GETFD,0);
@@ -2178,13 +2178,13 @@ int move_check_result_to_queue(char *che
 	int output_file_fd=-1;
 	mode_t new_umask=077;
 	mode_t old_umask;
-	int result=0;
+	int result=0,tmp;
 
 	/* save the file creation mask */
 	old_umask=umask(new_umask);
 
 	/* create a safe temp file */
-	asprintf(&output_file,"%s/cXXXXXX",check_result_path);
+	tmp=asprintf(&output_file,"%s/cXXXXXX",check_result_path);
 	output_file_fd=mkstemp(output_file);
 
 	/* file created okay */
@@ -2207,7 +2207,7 @@ int move_check_result_to_queue(char *che
 #endif
 
 		/* create an ok-to-go indicator file */
-		asprintf(&temp_buffer,"%s.ok",output_file);
+		tmp=asprintf(&temp_buffer,"%s.ok",output_file);
 		if((output_file_fd=open(temp_buffer,O_CREAT|O_WRONLY|O_TRUNC,S_IRUSR|S_IWUSR))>0)
 			close(output_file_fd);
 		my_free(temp_buffer);
@@ -2243,7 +2243,7 @@ int process_check_result_queue(char *dir
 	struct stat stat_buf;
 	struct stat ok_stat_buf;
 	char *temp_buffer=NULL;
-	int result=OK;
+	int result=OK,tmp;
 
 	/* make sure we have what we need */
 	if(dirname==NULL){
@@ -2292,7 +2292,7 @@ int process_check_result_queue(char *dir
 			/* at this point we have a regular file... */
 
 			/* can we find the associated ok-to-go file ? */
-			asprintf(&temp_buffer,"%s.ok",file);
+			tmp=asprintf(&temp_buffer,"%s.ok",file);
 			result=stat(temp_buffer,&ok_stat_buf);
 			my_free(temp_buffer);
 			if(result==-1)
@@ -2319,7 +2319,7 @@ int process_check_result_queue(char *dir
 /* reads check result(s) from a file */
 int process_check_result_file(char *fname){
 	mmapfile *thefile=NULL;
-	char *temp_buffer=NULL;
+	/* char *temp_buffer=NULL; */
 	char *input=NULL;
 	char *var=NULL;
 	char *val=NULL;
@@ -2494,12 +2494,12 @@ int process_check_result_file(char *fnam
 /* deletes as check result file, as well as its ok-to-go file */
 int delete_check_result_file(char *fname){
 	char *temp_buffer=NULL;
-
+	int tmp;
 	/* delete the result file */
 	unlink(fname);
 
 	/* delete the ok-to-go file */
-	asprintf(&temp_buffer,"%s.ok",fname);
+	tmp=asprintf(&temp_buffer,"%s.ok",fname);
 	unlink(temp_buffer);
 	my_free(temp_buffer);
 
@@ -3212,11 +3212,11 @@ int compare_hashdata(const char *val1a, 
 
 /* renames a file - works across filesystems (Mike Wiacek) */
 int my_rename(char *source, char *dest){
-	char buffer[MAX_INPUT_BUFFER]={0};
+	/* char buffer[MAX_INPUT_BUFFER]={0}; */
 	int rename_result=0;
-	int source_fd=-1;
-	int dest_fd=-1;
-	int bytes_read=0;
+	/* int source_fd=-1; */
+	/* int dest_fd=-1; */
+	/* int bytes_read=0; */
 
 
 	/* make sure we have something */
@@ -3263,7 +3263,7 @@ int my_fcopy(char *source, char *dest){
 	int source_fd=-1;
 	int dest_fd=-1;
 	int bytes_read=0;
-
+	int tmp;
 
 	/* make sure we have something */
 	if(source==NULL || dest==NULL)
@@ -3280,7 +3280,7 @@ int my_fcopy(char *source, char *dest){
 			
 			/* copy file contents */
 			while((bytes_read=read(source_fd,buffer,sizeof(buffer)))>0)
-				write(dest_fd,buffer,bytes_read);
+				tmp=write(dest_fd,buffer,bytes_read);
 
 			close(source_fd);
 			close(dest_fd);
@@ -3599,7 +3599,7 @@ int init_embedded_perl(char **env){
 #ifdef EMBEDDEDPERL
 	char *embedding[]={ "", "" };
 	int exitstatus=0;
-	char *temp_buffer=NULL;
+	/* char *temp_buffer=NULL; */
 	int argc=2;
 	struct stat stat_buf;
 
@@ -3667,7 +3667,7 @@ int file_uses_embedded_perl(char *fname)
 	char linen[80]="";
 	int line=0;
 	char *ptr=NULL;
-	int found_epn_directive=FALSE;
+	int found_epn_directive=FALSE,tmp;
 
 	if(enable_embedded_perl==TRUE){
 
@@ -3676,7 +3676,7 @@ int file_uses_embedded_perl(char *fname)
 		if(fp!=NULL){
 
 			/* grab the first line - we should see Perl */
-			fgets(line1,80,fp);
+			tmp=(int)fgets(line1,80,fp);
 
 			/* yep, its a Perl script... */
 			if(strstr(line1,"/bin/perl")!=NULL){
@@ -3984,7 +3984,7 @@ int submit_external_command(char *cmd, i
 /* submits a raw external command (without timestamp) for processing */
 int submit_raw_external_command(char *cmd, time_t *ts, int *buffer_items){
 	char *newcmd=NULL;
-	int result=OK;
+	int result=OK,tmp;
 	time_t timestamp;
 
 	if(cmd==NULL)
@@ -3997,7 +3997,7 @@ int submit_raw_external_command(char *cm
 		time(&timestamp);
 
 	/* create the command string */
-	asprintf(&newcmd,"[%lu] %s",(unsigned long)timestamp,cmd);
+	tmp=asprintf(&newcmd,"[%lu] %s",(unsigned long)timestamp,cmd);
 
 	/* submit the command */
 	result=submit_external_command(newcmd,buffer_items);
--- nagios-3.0.6/cgi/cgiauth.c.p11	2008-12-01 04:13:11 +1000
+++ nagios-3.0.6/cgi/cgiauth.c	2009-01-12 10:19:30 +1000
@@ -44,7 +44,7 @@ int get_authentication_information(authd
 	mmapfile *thefile;
 	char *input=NULL;
 	char *temp_ptr;
-	int needed_options;
+	/* int needed_options; */
 
 	if(authinfo==NULL)
 		return ERROR;
--- nagios-3.0.6/cgi/extinfo.c.p11	2008-12-01 03:22:58 +1000
+++ nagios-3.0.6/cgi/extinfo.c	2009-01-12 10:19:30 +1000
@@ -1016,7 +1016,7 @@ void show_host_info(void){
 	time_t current_time;
 	time_t t;
 	int duration_error=FALSE;
-
+	int tmp;
 
 	/* get host info */
 	temp_host=find_host(host_name);
@@ -1105,7 +1105,7 @@ void show_host_info(void){
 		printf("<TR><TD CLASS='dataVar' VALIGN='top'>Status Information:</td><td CLASS='dataVal'>%s",(temp_hoststatus->plugin_output==NULL)?"":html_encode(temp_hoststatus->plugin_output,TRUE));
 		if(enable_splunk_integration==TRUE){
 			printf("&nbsp;&nbsp;");
-			asprintf(&buf,"%s %s",temp_host->name,temp_hoststatus->plugin_output);
+			tmp=asprintf(&buf,"%s %s",temp_host->name,temp_hoststatus->plugin_output);
 			display_splunk_generic_url(buf,1);
 			free(buf);
 			}
@@ -1322,7 +1322,7 @@ void show_service_info(void){
 	int seconds;
 	time_t t;
 	time_t current_time;
-	int duration_error=FALSE;
+	int duration_error=FALSE,tmp;
 
 	/* find the service */
 	temp_service=find_service(host_name,service_desc);
@@ -1416,7 +1416,7 @@ void show_service_info(void){
 		printf("<TR><TD CLASS='dataVar' VALIGN='top'>Status Information:</TD><TD CLASS='dataVal'>%s",(temp_svcstatus->plugin_output==NULL)?"":html_encode(temp_svcstatus->plugin_output,TRUE));
 		if(enable_splunk_integration==TRUE){
 			printf("&nbsp;&nbsp;");
-			asprintf(&buf,"%s %s %s",temp_service->host_name,temp_service->description,temp_svcstatus->plugin_output);
+			tmp=asprintf(&buf,"%s %s %s",temp_service->host_name,temp_service->description,temp_svcstatus->plugin_output);
 			display_splunk_generic_url(buf,1);
 			free(buf);
 			}
--- nagios-3.0.6/cgi/statuswml.c.p11	2008-12-01 04:13:11 +1000
+++ nagios-3.0.6/cgi/statuswml.c	2009-01-12 10:19:30 +1000
@@ -1202,7 +1202,7 @@ void display_ping(void){
 	char *temp_ptr;
 	FILE *fp;
 	int odd=0;
-	int in_macro=FALSE;
+	int in_macro=FALSE,tmp;
 
 	/**** MAIN SCREEN (CARD 1) ****/
 	printf("<card id='card1' title='Ping'>\n");
@@ -1264,7 +1264,7 @@ void display_ping(void){
 			fp=popen(buffer,"r");
 			if(fp){
 				while(1){
-					fgets(buffer,sizeof(buffer)-1,fp);
+					tmp=(int)fgets(buffer,sizeof(buffer)-1,fp);
 					if(feof(fp))
 						break;
 
@@ -1299,7 +1299,7 @@ void display_ping(void){
 void display_traceroute(void){
 	char buffer[MAX_INPUT_BUFFER];
 	FILE *fp;
-	int odd=0;
+	int odd=0,tmp;
 
 	/**** MAIN SCREEN (CARD 1) ****/
 	printf("<card id='card1' title='Traceroute'>\n");
@@ -1333,7 +1333,7 @@ void display_traceroute(void){
 		fp=popen(buffer,"r");
 		if(fp){
 			while(1){
-				fgets(buffer,sizeof(buffer)-1,fp);
+				tmp=(int)fgets(buffer,sizeof(buffer)-1,fp);
 				if(feof(fp))
 					break;
 
--- nagios-3.0.6/common/downtime.c.p11	2008-12-01 03:22:58 +1000
+++ nagios-3.0.6/common/downtime.c	2009-01-12 10:19:30 +1000
@@ -238,7 +238,7 @@ int register_downtime(int type, unsigned
 	char *type_string=NULL;
 	int hours=0;
 	int minutes=0;
-	int seconds=0;
+	int seconds=0,tmp;
 	unsigned long *new_downtime_id=NULL;
 
 	log_debug_info(DEBUGL_FUNCTIONS,0,"register_downtime()\n");
@@ -269,9 +269,9 @@ int register_downtime(int type, unsigned
 	else
 		type_string="service";
 	if(temp_downtime->fixed==TRUE)
-		asprintf(&temp_buffer,"This %s has been scheduled for fixed downtime from %s to %s.  Notifications for the %s will not be sent out during that time period.",type_string,start_time_string,end_time_string,type_string);
+		tmp=asprintf(&temp_buffer,"This %s has been scheduled for fixed downtime from %s to %s.  Notifications for the %s will not be sent out during that time period.",type_string,start_time_string,end_time_string,type_string);
 	else
-		asprintf(&temp_buffer,"This %s has been scheduled for flexible downtime starting between %s and %s and lasting for a period of %d hours and %d minutes.  Notifications for the %s will not be sent out during that time period.",type_string,start_time_string,end_time_string,hours,minutes,type_string);
+		tmp=asprintf(&temp_buffer,"This %s has been scheduled for flexible downtime starting between %s and %s and lasting for a period of %d hours and %d minutes.  Notifications for the %s will not be sent out during that time period.",type_string,start_time_string,end_time_string,hours,minutes,type_string);
 
 
 	log_debug_info(DEBUGL_DOWNTIME,0,"Scheduled Downtime Details:\n");
--- nagios-3.0.6/common/macros.c.p11	2008-12-01 03:22:58 +1000
+++ nagios-3.0.6/common/macros.c	2009-01-12 10:19:30 +1000
@@ -669,9 +669,9 @@ int grab_macrox_value(int macro_type, ch
 	int services_critical_unhandled=0;
 	int service_problems=0;
 	int service_problems_unhandled=0;
+	int tmp;
 #endif
 
-
 	if(output==NULL || free_macro==NULL)
 		return ERROR;
 
@@ -1231,22 +1231,22 @@ int grab_macrox_value(int macro_type, ch
 			/* these macros are time-intensive to compute, and will likely be used together, so save them all for future use */
 			for(x=MACRO_TOTALHOSTSUP;x<=MACRO_TOTALSERVICEPROBLEMSUNHANDLED;x++)
 				my_free(macro_x[x]);
-			asprintf(&macro_x[MACRO_TOTALHOSTSUP],"%d",hosts_up);
-			asprintf(&macro_x[MACRO_TOTALHOSTSDOWN],"%d",hosts_down);
-			asprintf(&macro_x[MACRO_TOTALHOSTSUNREACHABLE],"%d",hosts_unreachable);
-			asprintf(&macro_x[MACRO_TOTALHOSTSDOWNUNHANDLED],"%d",hosts_down_unhandled);
-			asprintf(&macro_x[MACRO_TOTALHOSTSUNREACHABLEUNHANDLED],"%d",hosts_unreachable_unhandled);
-			asprintf(&macro_x[MACRO_TOTALHOSTPROBLEMS],"%d",host_problems);
-			asprintf(&macro_x[MACRO_TOTALHOSTPROBLEMSUNHANDLED],"%d",host_problems_unhandled);
-			asprintf(&macro_x[MACRO_TOTALSERVICESOK],"%d",services_ok);
-			asprintf(&macro_x[MACRO_TOTALSERVICESWARNING],"%d",services_warning);
-			asprintf(&macro_x[MACRO_TOTALSERVICESCRITICAL],"%d",services_critical);
-			asprintf(&macro_x[MACRO_TOTALSERVICESUNKNOWN],"%d",services_unknown);
-			asprintf(&macro_x[MACRO_TOTALSERVICESWARNINGUNHANDLED],"%d",services_warning_unhandled);
-			asprintf(&macro_x[MACRO_TOTALSERVICESCRITICALUNHANDLED],"%d",services_critical_unhandled);
-			asprintf(&macro_x[MACRO_TOTALSERVICESUNKNOWNUNHANDLED],"%d",services_unknown_unhandled);
-			asprintf(&macro_x[MACRO_TOTALSERVICEPROBLEMS],"%d",service_problems);
-			asprintf(&macro_x[MACRO_TOTALSERVICEPROBLEMSUNHANDLED],"%d",service_problems_unhandled);
+			tmp=asprintf(&macro_x[MACRO_TOTALHOSTSUP],"%d",hosts_up);
+			tmp=asprintf(&macro_x[MACRO_TOTALHOSTSDOWN],"%d",hosts_down);
+			tmp=asprintf(&macro_x[MACRO_TOTALHOSTSUNREACHABLE],"%d",hosts_unreachable);
+			tmp=asprintf(&macro_x[MACRO_TOTALHOSTSDOWNUNHANDLED],"%d",hosts_down_unhandled);
+			tmp=asprintf(&macro_x[MACRO_TOTALHOSTSUNREACHABLEUNHANDLED],"%d",hosts_unreachable_unhandled);
+			tmp=asprintf(&macro_x[MACRO_TOTALHOSTPROBLEMS],"%d",host_problems);
+			tmp=asprintf(&macro_x[MACRO_TOTALHOSTPROBLEMSUNHANDLED],"%d",host_problems_unhandled);
+			tmp=asprintf(&macro_x[MACRO_TOTALSERVICESOK],"%d",services_ok);
+			tmp=asprintf(&macro_x[MACRO_TOTALSERVICESWARNING],"%d",services_warning);
+			tmp=asprintf(&macro_x[MACRO_TOTALSERVICESCRITICAL],"%d",services_critical);
+			tmp=asprintf(&macro_x[MACRO_TOTALSERVICESUNKNOWN],"%d",services_unknown);
+			tmp=asprintf(&macro_x[MACRO_TOTALSERVICESWARNINGUNHANDLED],"%d",services_warning_unhandled);
+			tmp=asprintf(&macro_x[MACRO_TOTALSERVICESCRITICALUNHANDLED],"%d",services_critical_unhandled);
+			tmp=asprintf(&macro_x[MACRO_TOTALSERVICESUNKNOWNUNHANDLED],"%d",services_unknown_unhandled);
+			tmp=asprintf(&macro_x[MACRO_TOTALSERVICEPROBLEMS],"%d",service_problems);
+			tmp=asprintf(&macro_x[MACRO_TOTALSERVICEPROBLEMSUNHANDLED],"%d",service_problems_unhandled);
 			}
 
 		/* return only the macro the user requested */
@@ -1486,7 +1486,7 @@ int grab_datetime_macro(int macro_type, 
 #ifdef NSCORE
 	time_t next_valid_time=0L;
 #endif
-
+	int tmp;
 	if(output==NULL)
 		return ERROR;
 
@@ -1546,19 +1546,19 @@ int grab_datetime_macro(int macro_type, 
 		break;
 
 	case MACRO_TIMET:
-		asprintf(output,"%lu",(unsigned long)current_time);
+		tmp=asprintf(output,"%lu",(unsigned long)current_time);
 		break;
 
 #ifdef NSCORE
 	case MACRO_ISVALIDTIME:
-		asprintf(output,"%d",(check_time_against_period(test_time,temp_timeperiod)==OK)?1:0);
+		tmp=asprintf(output,"%d",(check_time_against_period(test_time,temp_timeperiod)==OK)?1:0);
 		break;
 
 	case MACRO_NEXTVALIDTIME:
 		get_next_valid_time(test_time,&next_valid_time,temp_timeperiod);
 		if(next_valid_time==test_time && check_time_against_period(test_time,temp_timeperiod)==ERROR)
 			next_valid_time=(time_t)0L;
-		asprintf(output,"%lu",(unsigned long)next_valid_time);
+		tmp=asprintf(output,"%lu",(unsigned long)next_valid_time);
 		break;
 #endif
 
@@ -1593,8 +1593,8 @@ int grab_standard_host_macro(int macro_t
 	int total_host_services_warning=0;
 	int total_host_services_unknown=0;
 	int total_host_services_critical=0;
+	int tmp;
 #endif
-
 	if(temp_host==NULL || output==NULL || free_macro==NULL)
 		return ERROR;
 
@@ -1627,7 +1627,7 @@ int grab_standard_host_macro(int macro_t
 			*output=(char *)strdup("UP");
 		break;
 	case MACRO_HOSTSTATEID:
-		asprintf(output,"%d",temp_host->current_state);
+		tmp=asprintf(output,"%d",temp_host->current_state);
 		break;
 	case MACRO_LASTHOSTSTATE:
 		if(temp_host->last_state==HOST_DOWN)
@@ -1638,13 +1638,13 @@ int grab_standard_host_macro(int macro_t
 			*output=(char *)strdup("UP");
 		break;
 	case MACRO_LASTHOSTSTATEID:
-		asprintf(output,"%d",temp_host->last_state);
+		tmp=asprintf(output,"%d",temp_host->last_state);
 		break;
 	case MACRO_HOSTCHECKTYPE:
-		asprintf(output,"%s",(temp_host->check_type==HOST_CHECK_PASSIVE)?"PASSIVE":"ACTIVE");
+		tmp=asprintf(output,"%s",(temp_host->check_type==HOST_CHECK_PASSIVE)?"PASSIVE":"ACTIVE");
 		break;
 	case MACRO_HOSTSTATETYPE:
-		asprintf(output,"%s",(temp_host->state_type==HARD_STATE)?"HARD":"SOFT");
+		tmp=asprintf(output,"%s",(temp_host->state_type==HARD_STATE)?"HARD":"SOFT");
 		break;
 	case MACRO_HOSTOUTPUT:
 		if(temp_host->plugin_output)
@@ -1665,16 +1665,16 @@ int grab_standard_host_macro(int macro_t
 		break;
 #ifdef NSCORE
 	case MACRO_HOSTATTEMPT:
-		asprintf(output,"%d",temp_host->current_attempt);
+		tmp=asprintf(output,"%d",temp_host->current_attempt);
 		break;
 	case MACRO_MAXHOSTATTEMPTS:
-		asprintf(output,"%d",temp_host->max_attempts);
+		tmp=asprintf(output,"%d",temp_host->max_attempts);
 		break;
 	case MACRO_HOSTDOWNTIME:
-		asprintf(output,"%d",temp_host->scheduled_downtime_depth);
+		tmp=asprintf(output,"%d",temp_host->scheduled_downtime_depth);
 		break;
 	case MACRO_HOSTPERCENTCHANGE:
-		asprintf(output,"%.2f",temp_host->percent_state_change);
+		tmp=asprintf(output,"%.2f",temp_host->percent_state_change);
 		break;
 	case MACRO_HOSTDURATIONSEC:
 	case MACRO_HOSTDURATION:
@@ -1682,7 +1682,7 @@ int grab_standard_host_macro(int macro_t
 		duration=(unsigned long)(current_time-temp_host->last_state_change);
 
 		if(macro_type==MACRO_HOSTDURATIONSEC)
-			asprintf(output,"%lu",duration);
+			tmp=asprintf(output,"%lu",duration);
 		else{
 
 			days=duration/86400;
@@ -1692,47 +1692,47 @@ int grab_standard_host_macro(int macro_t
 			minutes=duration/60;
 			duration-=(minutes*60);
 			seconds=duration;
-			asprintf(output,"%dd %dh %dm %ds",days,hours,minutes,seconds);
+			tmp=asprintf(output,"%dd %dh %dm %ds",days,hours,minutes,seconds);
 			}
 		break;
 	case MACRO_HOSTEXECUTIONTIME:
-		asprintf(output,"%.3f",temp_host->execution_time);
+		tmp=asprintf(output,"%.3f",temp_host->execution_time);
 		break;
 	case MACRO_HOSTLATENCY:
-		asprintf(output,"%.3f",temp_host->latency);
+		tmp=asprintf(output,"%.3f",temp_host->latency);
 		break;
 	case MACRO_LASTHOSTCHECK:
-		asprintf(output,"%lu",(unsigned long)temp_host->last_check);
+		tmp=asprintf(output,"%lu",(unsigned long)temp_host->last_check);
 		break;
 	case MACRO_LASTHOSTSTATECHANGE:
-		asprintf(output,"%lu",(unsigned long)temp_host->last_state_change);
+		tmp=asprintf(output,"%lu",(unsigned long)temp_host->last_state_change);
 		break;
 	case MACRO_LASTHOSTUP:
-		asprintf(output,"%lu",(unsigned long)temp_host->last_time_up);
+		tmp=asprintf(output,"%lu",(unsigned long)temp_host->last_time_up);
 		break;
 	case MACRO_LASTHOSTDOWN:
-		asprintf(output,"%lu",(unsigned long)temp_host->last_time_down);
+		tmp=asprintf(output,"%lu",(unsigned long)temp_host->last_time_down);
 		break;
 	case MACRO_LASTHOSTUNREACHABLE:
-		asprintf(output,"%lu",(unsigned long)temp_host->last_time_unreachable);
+		tmp=asprintf(output,"%lu",(unsigned long)temp_host->last_time_unreachable);
 		break;
 	case MACRO_HOSTNOTIFICATIONNUMBER:
-		asprintf(output,"%d",temp_host->current_notification_number);
+		tmp=asprintf(output,"%d",temp_host->current_notification_number);
 		break;
 	case MACRO_HOSTNOTIFICATIONID:
-		asprintf(output,"%lu",temp_host->current_notification_id);
+		tmp=asprintf(output,"%lu",temp_host->current_notification_id);
 		break;
 	case MACRO_HOSTEVENTID:
-		asprintf(output,"%lu",temp_host->current_event_id);
+		tmp=asprintf(output,"%lu",temp_host->current_event_id);
 		break;
 	case MACRO_LASTHOSTEVENTID:
-		asprintf(output,"%lu",temp_host->last_event_id);
+		tmp=asprintf(output,"%lu",temp_host->last_event_id);
 		break;
 	case MACRO_HOSTPROBLEMID:
-		asprintf(output,"%lu",temp_host->current_problem_id);
+		tmp=asprintf(output,"%lu",temp_host->current_problem_id);
 		break;
 	case MACRO_LASTHOSTPROBLEMID:
-		asprintf(output,"%lu",temp_host->last_problem_id);
+		tmp=asprintf(output,"%lu",temp_host->last_problem_id);
 		break;
 #endif
 	case MACRO_HOSTACTIONURL:
@@ -1755,7 +1755,7 @@ int grab_standard_host_macro(int macro_t
 			if((temp_hostgroup=(hostgroup *)temp_objectlist->object_ptr)==NULL)
 				continue;
 
-			asprintf(&buf1,"%s%s%s",(buf2)?buf2:"",(buf2)?",":"",temp_hostgroup->group_name);
+			tmp=asprintf(&buf1,"%s%s%s",(buf2)?buf2:"",(buf2)?",":"",temp_hostgroup->group_name);
 			my_free(buf2);
 			buf2=buf1;
 			}
@@ -1799,15 +1799,15 @@ int grab_standard_host_macro(int macro_t
 
 			/* these macros are time-intensive to compute, and will likely be used together, so save them all for future use */
 			my_free(macro_x[MACRO_TOTALHOSTSERVICES]);
-			asprintf(&macro_x[MACRO_TOTALHOSTSERVICES],"%d",total_host_services);
+			tmp=asprintf(&macro_x[MACRO_TOTALHOSTSERVICES],"%d",total_host_services);
 			my_free(macro_x[MACRO_TOTALHOSTSERVICESOK]);
-			asprintf(&macro_x[MACRO_TOTALHOSTSERVICESOK],"%d",total_host_services_ok);
+			tmp=asprintf(&macro_x[MACRO_TOTALHOSTSERVICESOK],"%d",total_host_services_ok);
 			my_free(macro_x[MACRO_TOTALHOSTSERVICESWARNING]);
-			asprintf(&macro_x[MACRO_TOTALHOSTSERVICESWARNING],"%d",total_host_services_warning);
+			tmp=asprintf(&macro_x[MACRO_TOTALHOSTSERVICESWARNING],"%d",total_host_services_warning);
 			my_free(macro_x[MACRO_TOTALHOSTSERVICESUNKNOWN]);
-			asprintf(&macro_x[MACRO_TOTALHOSTSERVICESUNKNOWN],"%d",total_host_services_unknown);
+			tmp=asprintf(&macro_x[MACRO_TOTALHOSTSERVICESUNKNOWN],"%d",total_host_services_unknown);
 			my_free(macro_x[MACRO_TOTALHOSTSERVICESCRITICAL]);
-			asprintf(&macro_x[MACRO_TOTALHOSTSERVICESCRITICAL],"%d",total_host_services_critical);
+			tmp=asprintf(&macro_x[MACRO_TOTALHOSTSERVICESCRITICAL],"%d",total_host_services_critical);
 			}
 
 		/* return only the macro the user requested */
@@ -1949,7 +1949,7 @@ int grab_standard_service_macro(int macr
 	char *buf1=NULL;
 	char *buf2=NULL;
 #endif
-
+	int tmp;
 	if(temp_service==NULL || output==NULL)
 		return ERROR;
 
@@ -2001,7 +2001,7 @@ int grab_standard_service_macro(int macr
 			*output=(char *)strdup("UNKNOWN");
 		break;
 	case MACRO_SERVICESTATEID:
-		asprintf(output,"%d",temp_service->current_state);
+		tmp=asprintf(output,"%d",temp_service->current_state);
 		break;
 	case MACRO_LASTSERVICESTATE:
 		if(temp_service->last_state==STATE_OK)
@@ -2014,48 +2014,48 @@ int grab_standard_service_macro(int macr
 			*output=(char *)strdup("UNKNOWN");
 		break;
 	case MACRO_LASTSERVICESTATEID:
-		asprintf(output,"%d",temp_service->last_state);
+		tmp=asprintf(output,"%d",temp_service->last_state);
 		break;
 #endif
 	case MACRO_SERVICEISVOLATILE:
-		asprintf(output,"%d",temp_service->is_volatile);
+		tmp=asprintf(output,"%d",temp_service->is_volatile);
 		break;
 #ifdef NSCORE
 	case MACRO_SERVICEATTEMPT:
-		asprintf(output,"%d",temp_service->current_attempt);
+		tmp=asprintf(output,"%d",temp_service->current_attempt);
 		break;
 	case MACRO_MAXSERVICEATTEMPTS:
-		asprintf(output,"%d",temp_service->max_attempts);
+		tmp=asprintf(output,"%d",temp_service->max_attempts);
 		break;
 	case MACRO_SERVICEEXECUTIONTIME:
-		asprintf(output,"%.3f",temp_service->execution_time);
+		tmp=asprintf(output,"%.3f",temp_service->execution_time);
 		break;
 	case MACRO_SERVICELATENCY:
-		asprintf(output,"%.3f",temp_service->latency);
+		tmp=asprintf(output,"%.3f",temp_service->latency);
 		break;
 	case MACRO_LASTSERVICECHECK:
-		asprintf(output,"%lu",(unsigned long)temp_service->last_check);
+		tmp=asprintf(output,"%lu",(unsigned long)temp_service->last_check);
 		break;
 	case MACRO_LASTSERVICESTATECHANGE:
-		asprintf(output,"%lu",(unsigned long)temp_service->last_state_change);
+		tmp=asprintf(output,"%lu",(unsigned long)temp_service->last_state_change);
 		break;
 	case MACRO_LASTSERVICEOK:
-		asprintf(output,"%lu",(unsigned long)temp_service->last_time_ok);
+		tmp=asprintf(output,"%lu",(unsigned long)temp_service->last_time_ok);
 		break;
 	case MACRO_LASTSERVICEWARNING:
-		asprintf(output,"%lu",(unsigned long)temp_service->last_time_warning);
+		tmp=asprintf(output,"%lu",(unsigned long)temp_service->last_time_warning);
 		break;
 	case MACRO_LASTSERVICEUNKNOWN:
-		asprintf(output,"%lu",(unsigned long)temp_service->last_time_unknown);
+		tmp=asprintf(output,"%lu",(unsigned long)temp_service->last_time_unknown);
 		break;
 	case MACRO_LASTSERVICECRITICAL:
-		asprintf(output,"%lu",(unsigned long)temp_service->last_time_critical);
+		tmp=asprintf(output,"%lu",(unsigned long)temp_service->last_time_critical);
 		break;
 	case MACRO_SERVICEDOWNTIME:
-		asprintf(output,"%d",temp_service->scheduled_downtime_depth);
+		tmp=asprintf(output,"%d",temp_service->scheduled_downtime_depth);
 		break;
 	case MACRO_SERVICEPERCENTCHANGE:
-		asprintf(output,"%.2f",temp_service->percent_state_change);
+		tmp=asprintf(output,"%.2f",temp_service->percent_state_change);
 		break;
 	case MACRO_SERVICEDURATIONSEC:
 	case MACRO_SERVICEDURATION:
@@ -2065,7 +2065,7 @@ int grab_standard_service_macro(int macr
 
 		/* get the state duration in seconds */
 		if(macro_type==MACRO_SERVICEDURATIONSEC)
-			asprintf(output,"%lu",duration);
+			tmp=asprintf(output,"%lu",duration);
 
 		/* get the state duration */
 		else{
@@ -2076,26 +2076,26 @@ int grab_standard_service_macro(int macr
 			minutes=duration/60;
 			duration-=(minutes*60);
 			seconds=duration;
-			asprintf(output,"%dd %dh %dm %ds",days,hours,minutes,seconds);
+			tmp=asprintf(output,"%dd %dh %dm %ds",days,hours,minutes,seconds);
 			}
 		break;
 	case MACRO_SERVICENOTIFICATIONNUMBER:
-		asprintf(output,"%d",temp_service->current_notification_number);
+		tmp=asprintf(output,"%d",temp_service->current_notification_number);
 		break;
 	case MACRO_SERVICENOTIFICATIONID:
-		asprintf(output,"%lu",temp_service->current_notification_id);
+		tmp=asprintf(output,"%lu",temp_service->current_notification_id);
 		break;
 	case MACRO_SERVICEEVENTID:
-		asprintf(output,"%lu",temp_service->current_event_id);
+		tmp=asprintf(output,"%lu",temp_service->current_event_id);
 		break;
 	case MACRO_LASTSERVICEEVENTID:
-		asprintf(output,"%lu",temp_service->last_event_id);
+		tmp=asprintf(output,"%lu",temp_service->last_event_id);
 		break;
 	case MACRO_SERVICEPROBLEMID:
-		asprintf(output,"%lu",temp_service->current_problem_id);
+		tmp=asprintf(output,"%lu",temp_service->current_problem_id);
 		break;
 	case MACRO_LASTSERVICEPROBLEMID:
-		asprintf(output,"%lu",temp_service->last_problem_id);
+		tmp=asprintf(output,"%lu",temp_service->last_problem_id);
 		break;
 #endif
 	case MACRO_SERVICEACTIONURL:
@@ -2118,7 +2118,7 @@ int grab_standard_service_macro(int macr
 			if((temp_servicegroup=(servicegroup *)temp_objectlist->object_ptr)==NULL)
 				continue;
 
-			asprintf(&buf1,"%s%s%s",(buf2)?buf2:"",(buf2)?",":"",temp_servicegroup->group_name);
+			tmp=asprintf(&buf1,"%s%s%s",(buf2)?buf2:"",(buf2)?",":"",temp_servicegroup->group_name);
 			my_free(buf2);
 			buf2=buf1;
 			}
@@ -2257,8 +2257,8 @@ int grab_standard_contact_macro(int macr
 	objectlist *temp_objectlist=NULL;
 	char *buf1=NULL;
 	char *buf2=NULL;
+	int tmp;
 #endif
-
 	if(temp_contact==NULL || output==NULL)
 		return ERROR;
 
@@ -2287,7 +2287,7 @@ int grab_standard_contact_macro(int macr
 			if((temp_contactgroup=(contactgroup *)temp_objectlist->object_ptr)==NULL)
 				continue;
 
-			asprintf(&buf1,"%s%s%s",(buf2)?buf2:"",(buf2)?",":"",temp_contactgroup->group_name);
+			tmp=asprintf(&buf1,"%s%s%s",(buf2)?buf2:"",(buf2)?",":"",temp_contactgroup->group_name);
 			my_free(buf2);
 			buf2=buf1;
 			}
@@ -3170,10 +3170,10 @@ int set_macrox_environment_vars(int set)
 int set_argv_macro_environment_vars(int set){
 	char *macro_name=NULL;
 	register int x=0;
-
+	int tmp;
 	/* set each of the argv macro environment variables */
 	for(x=0;x<MAX_COMMAND_ARGUMENTS;x++){
-		asprintf(&macro_name,"ARG%d",x+1);
+		tmp=asprintf(&macro_name,"ARG%d",x+1);
 		set_macro_environment_var(macro_name,macro_argv[x],set);
 		my_free(macro_name);
 	        }
@@ -3190,12 +3190,12 @@ int set_custom_macro_environment_vars(in
 	service *temp_service=NULL;
 	contact *temp_contact=NULL;
 	char *customvarname=NULL;
-
+	int tmp;
 	/***** CUSTOM HOST VARIABLES *****/
 	/* generate variables and save them for later */
 	if((temp_host=macro_host_ptr) && set==TRUE){
 		for(temp_customvariablesmember=temp_host->custom_variables;temp_customvariablesmember!=NULL;temp_customvariablesmember=temp_customvariablesmember->next){
-			asprintf(&customvarname,"_HOST%s",temp_customvariablesmember->variable_name);
+			tmp=asprintf(&customvarname,"_HOST%s",temp_customvariablesmember->variable_name);
 			add_custom_variable_to_object(&macro_custom_host_vars,customvarname,temp_customvariablesmember->variable_value);
 			my_free(customvarname);
 			}
@@ -3209,7 +3209,7 @@ int set_custom_macro_environment_vars(in
 	/* generate variables and save them for later */
 	if((temp_service=macro_service_ptr) && set==TRUE){
 		for(temp_customvariablesmember=temp_service->custom_variables;temp_customvariablesmember!=NULL;temp_customvariablesmember=temp_customvariablesmember->next){
-			asprintf(&customvarname,"_SERVICE%s",temp_customvariablesmember->variable_name);
+			tmp=asprintf(&customvarname,"_SERVICE%s",temp_customvariablesmember->variable_name);
 			add_custom_variable_to_object(&macro_custom_service_vars,customvarname,temp_customvariablesmember->variable_value);
 			my_free(customvarname);
 			}
@@ -3222,7 +3222,7 @@ int set_custom_macro_environment_vars(in
 	/* generate variables and save them for later */
 	if((temp_contact=macro_contact_ptr) && set==TRUE){
 		for(temp_customvariablesmember=temp_contact->custom_variables;temp_customvariablesmember!=NULL;temp_customvariablesmember=temp_customvariablesmember->next){
-			asprintf(&customvarname,"_CONTACT%s",temp_customvariablesmember->variable_name);
+			tmp=asprintf(&customvarname,"_CONTACT%s",temp_customvariablesmember->variable_name);
 			add_custom_variable_to_object(&macro_custom_contact_vars,customvarname,temp_customvariablesmember->variable_value);
 			my_free(customvarname);
 			}
@@ -3240,13 +3240,13 @@ int set_custom_macro_environment_vars(in
 int set_contact_address_environment_vars(int set){
 	char *varname=NULL;
 	register int x;
-
+	int tmp;
 	/* these only get set during notifications */
 	if(macro_contact_ptr==NULL)
 		return OK;
 
 	for(x=0;x<MAX_CONTACT_ADDRESSES;x++){
-		asprintf(&varname,"CONTACTADDRESS%d",x);
+		tmp=asprintf(&varname,"CONTACTADDRESS%d",x);
 		set_macro_environment_var(varname,macro_contact_ptr->address[x],set);
 		my_free(varname);
 		}
@@ -3259,13 +3259,13 @@ int set_contact_address_environment_vars
 /* sets or unsets a macro environment variable */
 int set_macro_environment_var(char *name, char *value, int set){
 	char *env_macro_name=NULL;
-
+	int tmp;
 	/* we won't mess with null variable names */
 	if(name==NULL)
 		return ERROR;
 
 	/* create environment var name */
-	asprintf(&env_macro_name,"%s%s",MACRO_ENV_VAR_PREFIX,name);
+	tmp=asprintf(&env_macro_name,"%s%s",MACRO_ENV_VAR_PREFIX,name);
 
 	/* set or unset the environment variable */
 	set_environment_var(env_macro_name,value,set);
--- nagios-3.0.6/common/objects.c.p11	2008-12-01 03:22:59 +1000
+++ nagios-3.0.6/common/objects.c	2009-01-12 10:19:30 +1000
@@ -180,7 +180,7 @@ int skiplist_compare_host(void *a, void 
 int skiplist_compare_service(void *a, void *b){
 	service *oa=NULL;
 	service *ob=NULL;
-	int result=0;
+	/* int result=0; */
 
 	oa=(service *)a;
 	ob=(service *)b;
@@ -325,7 +325,7 @@ int skiplist_compare_hostescalation(void
 int skiplist_compare_serviceescalation(void *a, void *b){
 	serviceescalation *oa=NULL;
 	serviceescalation *ob=NULL;
-	int result=0;
+	/* int result=0; */
 
 	oa=(serviceescalation *)a;
 	ob=(serviceescalation *)b;
@@ -362,7 +362,7 @@ int skiplist_compare_hostdependency(void
 int skiplist_compare_servicedependency(void *a, void *b){
 	servicedependency *oa=NULL;
 	servicedependency *ob=NULL;
-	int result=0;
+	/* int result=0; */
 
 	oa=(servicedependency *)a;
 	ob=(servicedependency *)b;
--- nagios-3.0.6/common/statusdata.c.p11	2008-12-01 03:22:59 +1000
+++ nagios-3.0.6/common/statusdata.c	2009-01-12 10:19:30 +1000
@@ -322,7 +322,7 @@ int add_servicestatus_to_hashlist(servic
 /* adds a host status entry to the list in memory */
 int add_host_status(hoststatus *new_hoststatus){
 	char date_string[MAX_DATETIME_LENGTH];
-
+	int tmp;
 	/* make sure we have what we need */
 	if(new_hoststatus==NULL)
 		return ERROR;
@@ -351,13 +351,13 @@ int add_host_status(hoststatus *new_host
 			my_free(new_hoststatus->plugin_output);
 			if(new_hoststatus->should_be_scheduled==TRUE){
 				get_time_string(&new_hoststatus->next_check,date_string,sizeof(date_string),LONG_DATE_TIME);
-				asprintf(&new_hoststatus->plugin_output,"Host check scheduled for %s",date_string);
+				tmp=asprintf(&new_hoststatus->plugin_output,"Host check scheduled for %s",date_string);
 			        }
 			else{
 				/* passive-only hosts that have just been scheduled for a forced check */
 				if(new_hoststatus->checks_enabled==FALSE && new_hoststatus->next_check!=(time_t)0L && (new_hoststatus->check_options & CHECK_OPTION_FORCE_EXECUTION)){
 					get_time_string(&new_hoststatus->next_check,date_string,sizeof(date_string),LONG_DATE_TIME);
-					asprintf(&new_hoststatus->plugin_output,"Forced host check scheduled for %s",date_string);
+					tmp=asprintf(&new_hoststatus->plugin_output,"Forced host check scheduled for %s",date_string);
 					}
 				/* passive-only hosts not scheduled to be checked */
 				else
@@ -390,7 +390,7 @@ int add_host_status(hoststatus *new_host
 /* adds a service status entry to the list in memory */
 int add_service_status(servicestatus *new_svcstatus){
 	char date_string[MAX_DATETIME_LENGTH];
-
+	int tmp;
 	/* make sure we have what we need */
 	if(new_svcstatus==NULL)
 		return ERROR;
@@ -423,13 +423,13 @@ int add_service_status(servicestatus *ne
 			my_free(new_svcstatus->plugin_output);
 			if(new_svcstatus->should_be_scheduled==TRUE){
 				get_time_string(&new_svcstatus->next_check,date_string,sizeof(date_string),LONG_DATE_TIME);
-				asprintf(&new_svcstatus->plugin_output,"Service check scheduled for %s",date_string);
+				tmp=asprintf(&new_svcstatus->plugin_output,"Service check scheduled for %s",date_string);
 			        }
 			else{
 				/* passive-only services that have just been scheduled for a forced check */
 				if(new_svcstatus->checks_enabled==FALSE && new_svcstatus->next_check!=(time_t)0L && (new_svcstatus->check_options & CHECK_OPTION_FORCE_EXECUTION)){
 					get_time_string(&new_svcstatus->next_check,date_string,sizeof(date_string),LONG_DATE_TIME);
-					asprintf(&new_svcstatus->plugin_output,"Forced service check scheduled for %s",date_string);
+					tmp=asprintf(&new_svcstatus->plugin_output,"Forced service check scheduled for %s",date_string);
 					}
 				/* passive-only services not scheduled to be checked */
 				else
--- nagios-3.0.6/contrib/convertcfg.c.p11	2008-12-01 03:22:59 +1000
+++ nagios-3.0.6/contrib/convertcfg.c	2009-01-12 10:19:30 +1000
@@ -669,7 +669,7 @@ int main(int argc, char **argv){
 			temp_ptr=my_strsep(&temp_ptr2,"[");
 			temp_ptr=my_strsep(&temp_ptr2,";");
 
-			printf("# serviceextinfo definition\n",temp_ptr);
+			printf("# serviceextinfo definition\n");
 			printf("define serviceextinfo{\n");
 			printf("\thost_name\t\t%s\t\t; The name of the service this data is associated with\n",temp_ptr);
 
--- nagios-3.0.6/contrib/mini_epn.c.p11	2005-11-15 11:49:36 +1000
+++ nagios-3.0.6/contrib/mini_epn.c	2009-01-12 10:19:30 +1000
@@ -37,7 +37,7 @@ int main(int argc, char **argv, char **e
 
 	        while(printf("Enter file name: ") && fgets(command_line, 80, stdin)) {
 			SV *plugin_hndlr_cr;
-		        STRLEN n_a;
+		        /* STRLEN n_a; */
 			int count = 0 ;
 
 			dSP;
--- nagios-3.0.6/contrib/new_mini_epn.c.p11	2005-11-15 11:49:36 +1000
+++ nagios-3.0.6/contrib/new_mini_epn.c	2009-01-12 10:19:30 +1000
@@ -56,7 +56,7 @@ void run_plugin(char *command_line) {
 #endif
 
 	SV *plugin_hndlr_cr ;
-	STRLEN n_a ;
+	/* STRLEN n_a ; */
 	int count = 0 ;
 	int pclose_result;
 	char *plugin_output;
--- nagios-3.0.6/xdata/xodtemplate.c.p11	2008-12-01 03:22:59 +1000
+++ nagios-3.0.6/xdata/xodtemplate.c	2009-01-12 10:19:30 +1000
@@ -141,10 +141,10 @@ int xodtemplate_read_config_data(char *m
 	struct timeval tv[14];
 	double runtime[14];
 	mmapfile *thefile=NULL;
+	int tmp;
 #endif
 	int result=OK;
 
-
 	if(main_config_file==NULL)
 		return ERROR;
 
@@ -240,7 +240,7 @@ int xodtemplate_read_config_data(char *m
 
 				temp_buffer=(char *)strdup(val);
 				if(config_base_dir!=NULL && val[0]!='/')
-					asprintf(&config_file,"%s/%s",config_base_dir,temp_buffer);
+					tmp=asprintf(&config_file,"%s/%s",config_base_dir,temp_buffer);
 				else
 					config_file=temp_buffer;
 
@@ -259,7 +259,7 @@ int xodtemplate_read_config_data(char *m
 				
 				temp_buffer=(char *)strdup(val);
 				if(config_base_dir!=NULL && val[0]!='/')
-					asprintf(&config_file,"%s/%s",config_base_dir,temp_buffer);
+					tmp=asprintf(&config_file,"%s/%s",config_base_dir,temp_buffer);
 				else
 					config_file=temp_buffer;
 
--- nagios-3.0.6/xdata/xrddefault.c.p11	2008-12-01 03:22:59 +1000
+++ nagios-3.0.6/xdata/xrddefault.c	2009-01-12 10:19:30 +1000
@@ -254,7 +254,7 @@ int xrddefault_save_state_information(vo
 	unsigned long contact_service_attribute_mask=0L;
 	unsigned long process_host_attribute_mask=0L;
 	unsigned long process_service_attribute_mask=0L;
-
+	int tmp;
 
 	log_debug_info(DEBUGL_FUNCTIONS,0,"xrddefault_save_state_information()\n");
 
@@ -269,7 +269,7 @@ int xrddefault_save_state_information(vo
 	        }
 
 	/* open a safe temp file for output */
-	asprintf(&temp_file,"%sXXXXXX",xrddefault_temp_file);
+	tmp=asprintf(&temp_file,"%sXXXXXX",xrddefault_temp_file);
 	if(temp_file==NULL)
 		return ERROR;
 	if((fd=mkstemp(temp_file))==-1)
--- nagios-3.0.6/xdata/xsddefault.c.p11	2008-12-01 03:22:59 +1000
+++ nagios-3.0.6/xdata/xsddefault.c	2009-01-12 10:22:04 +1000
@@ -330,8 +330,8 @@ int xsddefault_save_status_data(void){
 	int fd=0;
 	FILE *fp=NULL;
 	int used_external_command_buffer_slots=0;
-	int high_external_command_buffer_slots=0;
-	void *ptr=NULL;
+	int high_external_command_buffer_slots=0, tmp;
+	/* void *ptr=NULL; */
 	int result=OK;
 
 	log_debug_info(DEBUGL_FUNCTIONS,0,"save_status_data()\n");
@@ -339,7 +339,7 @@ int xsddefault_save_status_data(void){
 	/* open a safe temp file for output */
 	if(xsddefault_temp_file==NULL)
 		return ERROR;
-	asprintf(&temp_file,"%sXXXXXX",xsddefault_temp_file);
+	tmp=asprintf(&temp_file,"%sXXXXXX",xsddefault_temp_file);
 	if(temp_file==NULL)
 		return ERROR;
 
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin