summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2002-05-19 16:12:54 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2002-05-19 16:12:54 +0000
commitc4e5acb16f8f4dfedad7090680f46e58b998f630 (patch)
tree79c1d0c7ca23bf99de73a02a374f5381bd9ab42f /src
parent0405c7864880d5969be4f3ed90d77ca18eb98dc1 (diff)
downloadzabbix-c4e5acb16f8f4dfedad7090680f46e58b998f630.tar.gz
zabbix-c4e5acb16f8f4dfedad7090680f46e58b998f630.tar.xz
zabbix-c4e5acb16f8f4dfedad7090680f46e58b998f630.zip
- removed option -Wall from all Makefiles (Alexei)
- removed "//" comments from Zabbix code (Alexei) git-svn-id: svn://svn.zabbix.com/trunk@378 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src')
-rw-r--r--src/zabbix_agent/Makefile.in4
-rw-r--r--src/zabbix_agent/sysinfo.c18
-rw-r--r--src/zabbix_agent/sysinfo.h4
-rw-r--r--src/zabbix_agent/zabbix_agent.c2
-rw-r--r--src/zabbix_agent/zabbix_agentd.c6
-rw-r--r--src/zabbix_sender/Makefile.in2
-rw-r--r--src/zabbix_sucker/zabbix_sucker.c2
7 files changed, 13 insertions, 25 deletions
diff --git a/src/zabbix_agent/Makefile.in b/src/zabbix_agent/Makefile.in
index 410e8fe9..f87a00c9 100644
--- a/src/zabbix_agent/Makefile.in
+++ b/src/zabbix_agent/Makefile.in
@@ -2,8 +2,8 @@
all:
- @CC@ -o ../../bin/zabbix_agent @CFLAGS@ -I../../include zabbix_agent.c sysinfo.c ../../include/cfg.c -Wall @LIBS@
- @CC@ -o ../../bin/zabbix_agentd @CFLAGS@ -I../../include zabbix_agentd.c sysinfo.c ../../include/log.c ../../include/cfg.c -Wall @LIBS@
+ @CC@ -o ../../bin/zabbix_agent @CFLAGS@ -I../../include zabbix_agent.c sysinfo.c ../../include/cfg.c @LIBS@
+ @CC@ -o ../../bin/zabbix_agentd @CFLAGS@ -I../../include zabbix_agentd.c sysinfo.c ../../include/log.c ../../include/cfg.c @LIBS@
clean:
rm -fv *.o
diff --git a/src/zabbix_agent/sysinfo.c b/src/zabbix_agent/sysinfo.c
index 7a7f02d5..9cffd38f 100644
--- a/src/zabbix_agent/sysinfo.c
+++ b/src/zabbix_agent/sysinfo.c
@@ -299,12 +299,6 @@ void process(char *command,char *value)
}
}
-// if(res == NULL)
-// {
-/* Not exactly ... */
-// result=NOTSUPPORTED;
-// }
-
if(ret_str==0)
{
sprintf(value,"%f",result);
@@ -1242,8 +1236,8 @@ char *EXECUTE_STR(char *command)
{
switch (errno)
{
-// case EINTR:
-// return TIMEOUT_ERROR;
+/* case EINTR:
+ return TIMEOUT_ERROR;*/
default:
printf("E1\n");
return NULL;
@@ -1255,8 +1249,8 @@ char *EXECUTE_STR(char *command)
pclose(f);
switch (errno)
{
-// case EINTR:
-// return TIMEOUT_ERROR;
+/* case EINTR:
+ return TIMEOUT_ERROR;*/
default:
printf("E1\n");
return NULL;
@@ -1267,8 +1261,8 @@ char *EXECUTE_STR(char *command)
{
switch (errno)
{
-// case EINTR:
-// return TIMEOUT_ERROR;
+/* case EINTR:
+ return TIMEOUT_ERROR;*/
default:
printf("E1\n");
return NULL;
diff --git a/src/zabbix_agent/sysinfo.h b/src/zabbix_agent/sysinfo.h
index dadb9658..ad3f6aa8 100644
--- a/src/zabbix_agent/sysinfo.h
+++ b/src/zabbix_agent/sysinfo.h
@@ -52,8 +52,8 @@ float CHECK_PORT(char *port);
COMMAND
{
char *key;
- void *function;
- void *function_str;
+ float (*function)();
+ char *(*function_str)();
char *parameter;
};
diff --git a/src/zabbix_agent/zabbix_agent.c b/src/zabbix_agent/zabbix_agent.c
index 1f9dfcc3..1810646a 100644
--- a/src/zabbix_agent/zabbix_agent.c
+++ b/src/zabbix_agent/zabbix_agent.c
@@ -65,7 +65,7 @@ void init_config(void)
*/
{"Server",&CONFIG_HOSTS_ALLOWED,0,TYPE_STRING,PARM_MAND,0,0},
{"Timeout",&CONFIG_TIMEOUT,0,TYPE_INT,PARM_OPT,1,30},
- {"UserParameter",0,&add_parameter,0,0,0,0},
+ {"UserParameter",0,(void *)&add_parameter,0,0,0,0},
{0}
};
diff --git a/src/zabbix_agent/zabbix_agentd.c b/src/zabbix_agent/zabbix_agentd.c
index 34c5e77d..45a86289 100644
--- a/src/zabbix_agent/zabbix_agentd.c
+++ b/src/zabbix_agent/zabbix_agentd.c
@@ -226,7 +226,7 @@ void init_config(void)
{"ListenPort",&CONFIG_LISTEN_PORT,0,TYPE_INT,PARM_OPT,1024,32767},
{"DebugLevel",&CONFIG_LOG_LEVEL,0,TYPE_INT,PARM_OPT,0,4},
{"StartAgents",&CONFIG_AGENTD_FORKS,0,TYPE_INT,PARM_OPT,1,16},
- {"UserParameter",0,&add_parameter,0,0,0,0},
+ {"UserParameter",0,(void *)&add_parameter,0,0,0,0},
{0}
};
parse_cfg_file("/etc/zabbix/zabbix_agentd.conf",cfg);
@@ -370,11 +370,8 @@ void child_main(int i,int listenfd, int addrlen)
{
int connfd;
socklen_t clilen;
-// struct sockaddr *cliaddr;
struct sockaddr cliaddr;
-// cliaddr=malloc(addrlen);
-
zabbix_log( LOG_LEVEL_WARNING, "zabbix_agentd %ld started",(long)getpid());
for(;;)
@@ -383,7 +380,6 @@ void child_main(int i,int listenfd, int addrlen)
#ifdef HAVE_FUNCTION_SETPROCTITLE
setproctitle("waiting for connection. Requests [%d]", stats_request++);
#endif
-// connfd=accept(listenfd,cliaddr, &clilen);
connfd=accept(listenfd,&cliaddr, &clilen);
#ifdef HAVE_FUNCTION_SETPROCTITLE
setproctitle("processing request");
diff --git a/src/zabbix_sender/Makefile.in b/src/zabbix_sender/Makefile.in
index d8d0f544..a6275051 100644
--- a/src/zabbix_sender/Makefile.in
+++ b/src/zabbix_sender/Makefile.in
@@ -2,7 +2,7 @@
all:
- @CC@ -o ../../bin/zabbix_sender @CFLAGS@ -I../../include zabbix_sender.c -Wall @LIBS@
+ @CC@ -o ../../bin/zabbix_sender @CFLAGS@ -I../../include zabbix_sender.c @LIBS@
clean:
rm -fv *.o
diff --git a/src/zabbix_sucker/zabbix_sucker.c b/src/zabbix_sucker/zabbix_sucker.c
index 294f29a7..a3e4ed43 100644
--- a/src/zabbix_sucker/zabbix_sucker.c
+++ b/src/zabbix_sucker/zabbix_sucker.c
@@ -640,7 +640,6 @@ int get_values(void)
item.lastvalue_null=0;
item.lastvalue_str=s;
item.lastvalue=atof(s);
-// item.lastvalue_str=DBget_field(result,i,13);
}
s=DBget_field(result,i,14);
if(s==NULL)
@@ -652,7 +651,6 @@ int get_values(void)
item.prevvalue_null=0;
item.prevvalue_str=s;
item.prevvalue=atof(s);
-// item.prevvalue_str=DBget_field(result,i,14);
}
item.hostid=atoi(DBget_field(result,i,15));
host_status=atoi(DBget_field(result,i,16));