[icinga-checkins] icinga.org: icinga-core/feature/exclude-with-regexp-3720: Issue #4392 - Compile-time errors in Icinga 1.9.2

git at icinga.org git at icinga.org
Sat Jul 20 13:54:45 CEST 2013


Module: icinga-core
Branch: feature/exclude-with-regexp-3720
Commit: af5600141238bb2c1254e4b5f77024b401be4421
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=af5600141238bb2c1254e4b5f77024b401be4421

Author: Carl Friend <crfriend at rcn.com>
Date:   Sun Jul  7 12:26:39 2013 -0400

Issue #4392 - Compile-time errors in Icinga 1.9.2

   This commit fixes three compile-time errors that manifest
when using GCC version 2.95.3.  These are the result of intermixing
statements and declarations.

   This is a portability fix only.

---

 cgi/extinfo.c                |    6 ++++--
 module/idoutils/src/ido2db.c |    4 ++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/cgi/extinfo.c b/cgi/extinfo.c
index cfd4dfd..400e26a 100644
--- a/cgi/extinfo.c
+++ b/cgi/extinfo.c
@@ -1580,10 +1580,11 @@ void show_host_info(void) {
 
 			/* Custom Variables */
 			if (temp_host->custom_variables) {
+				customvariablesmember *temp_customvar;
+
 				printf("<tr><td class='dataVar'>Custom Variables:</td><td class='dataVal'>\n");
 				printf("<table>\n");
 				printf("<tr><td class='dataCustomVar'>CV Name</td><td class='dataCustomVal'>CV Value</td></tr>\n");
-				customvariablesmember *temp_customvar;
 				for (temp_customvar = temp_host->custom_variables; temp_customvar != NULL; temp_customvar = temp_customvar->next) {
 					if (check_exclude_customvar(temp_customvar) == FALSE)
 						printf("<tr><td class='dataCustomVar'>%s</td><td class='dataCustomVal'>%s</td></tr>\n",temp_customvar->variable_name, temp_customvar->variable_value);
@@ -2030,10 +2031,11 @@ void show_service_info(void) {
 
 			/* Custom Variables */
 			if (temp_service->custom_variables) {
+				customvariablesmember *temp_customvar;
+
 				printf("<tr><td class='dataVar'>Custom Variables:</td><td class='dataVal'>\n");
 				printf("<table>\n");
 				printf("<tr><td class='dataCustomVar'>CV Name</td><td class='dataCustomVal'>CV Value</td></tr>\n");
-				customvariablesmember *temp_customvar;
 				for (temp_customvar = temp_service->custom_variables; temp_customvar != NULL; temp_customvar = temp_customvar->next) {
 				if (check_exclude_customvar(temp_customvar) == FALSE)
 					printf("<tr><td class='dataCustomVar'>%s</td><td class='dataCustomVal'>%s</td></tr>\n",temp_customvar->variable_name, temp_customvar->variable_value);
diff --git a/module/idoutils/src/ido2db.c b/module/idoutils/src/ido2db.c
index f1ff2b6..09c232f 100644
--- a/module/idoutils/src/ido2db.c
+++ b/module/idoutils/src/ido2db.c
@@ -1204,14 +1204,14 @@ static void *ido2db_proxy_thread_proc(void *pargs) {
 
 static ido2db_proxy *ido2db_proxy_new(int fd_left, int fd_right) {
 	pthread_t tid;
-
 	ido2db_proxy *proxy = (ido2db_proxy *)malloc(sizeof(ido2db_proxy));
+	ido2db_proxy_args *pa = (ido2db_proxy_args *)malloc(sizeof(ido2db_proxy_args));
+
 	pthread_mutex_init(&(proxy->mutex), NULL);
 	proxy->size_left = 0;
 	proxy->size_right = 0;
 	proxy->refs = 2;
 
-	ido2db_proxy_args *pa = (ido2db_proxy_args *)malloc(sizeof(ido2db_proxy_args));
 	pa->fd_left = fd_left;
 	pa->fd_right = fd_right;
 	pa->proxy = proxy;





More information about the icinga-checkins mailing list