fixed compiler warnings issued by:

gcc 4.3
	curl.h gcc type-checking
	glibc with enabled FORTIFY_SOURCE checking
This commit is contained in:
Martin Willi
2008-11-11 18:37:19 +00:00
parent 3d2dbebd70
commit 479f295049
22 changed files with 125 additions and 59 deletions
+2 -2
View File
@@ -215,7 +215,7 @@ starter_start_pluto (starter_config_t *cfg, bool no_fork)
_stop_requested = 0;
if (cfg->setup.prepluto)
system(cfg->setup.prepluto);
ignore_result(system(cfg->setup.prepluto));
pid = fork();
switch (pid)
@@ -258,7 +258,7 @@ starter_start_pluto (starter_config_t *cfg, bool no_fork)
DBG_log("pluto (%d) started", _pluto_pid)
)
if (cfg->setup.postpluto)
system(cfg->setup.postpluto);
ignore_result(system(cfg->setup.postpluto));
return 0;
}
}
+12 -12
View File
@@ -36,7 +36,7 @@ starter_klips_init(void)
/* ipsec module makes the pf_key proc interface visible */
if (stat(PROC_MODULES, &stb) == 0)
{
system("modprobe -qv ipsec");
ignore_result(system("modprobe -qv ipsec"));
}
/* now test again */
@@ -50,9 +50,9 @@ starter_klips_init(void)
}
/* load crypto algorithm modules */
system("modprobe -qv ipsec_aes");
system("modprobe -qv ipsec_blowfish");
system("modprobe -qv ipsec_sha2");
ignore_result(system("modprobe -qv ipsec_aes"));
ignore_result(system("modprobe -qv ipsec_blowfish"));
ignore_result(system("modprobe -qv ipsec_sha2"));
DBG(DBG_CONTROL,
DBG_log("Found KLIPS IPsec stack")
@@ -64,19 +64,19 @@ starter_klips_init(void)
void
starter_klips_cleanup(void)
{
if (system("type eroute > /dev/null 2>&1") == 0)
{
system("spi --clear");
system("eroute --clear");
}
if (system("type eroute > /dev/null 2>&1") == 0)
{
ignore_result(system("spi --clear"));
ignore_result(system("eroute --clear"));
}
else if (system("type setkey > /dev/null 2>&1") == 0)
{
system("setkey -F");
system("setkey -FP");
ignore_result(system("setkey -F"));
ignore_result(system("setkey -FP"));
}
else
{
plog("WARNING: cannot flush IPsec state/policy database");
plog("WARNING: cannot flush IPsec state/policy database");
}
}
+10 -10
View File
@@ -36,7 +36,7 @@ starter_netkey_init(void)
/* af_key module makes the netkey proc interface visible */
if (stat(PROC_MODULES, &stb) == 0)
{
system("modprobe -qv af_key");
ignore_result(system("modprobe -qv af_key"));
}
/* now test again */
@@ -52,11 +52,11 @@ starter_netkey_init(void)
/* make sure that all required IPsec modules are loaded */
if (stat(PROC_MODULES, &stb) == 0)
{
system("modprobe -qv ah4");
system("modprobe -qv esp4");
system("modprobe -qv ipcomp");
system("modprobe -qv xfrm4_tunnel");
system("modprobe -qv xfrm_user");
ignore_result(system("modprobe -qv ah4"));
ignore_result(system("modprobe -qv esp4"));
ignore_result(system("modprobe -qv ipcomp"));
ignore_result(system("modprobe -qv xfrm4_tunnel"));
ignore_result(system("modprobe -qv xfrm_user"));
}
DBG(DBG_CONTROL,
@@ -70,13 +70,13 @@ starter_netkey_cleanup(void)
{
if (system("ip xfrm state > /dev/null 2>&1") == 0)
{
system("ip xfrm state flush");
system("ip xfrm policy flush");
ignore_result(system("ip xfrm state flush"));
ignore_result(system("ip xfrm policy flush"));
}
else if (system("type setkey > /dev/null 2>&1") == 0)
{
system("setkey -F");
system("setkey -FP");
ignore_result(system("setkey -F"));
ignore_result(system("setkey -FP"));
}
else
{
+1
View File
@@ -23,6 +23,7 @@
#define MAX_INCLUDE_DEPTH 20
#define YY_NO_INPUT
#define YY_NO_UNPUT
extern void yyerror(const char *);
extern int yylex (void);
+2 -2
View File
@@ -180,7 +180,7 @@ static void generate_selfcert()
#endif
setegid(gid);
seteuid(uid);
system("ipsec scepclient --out pkcs1 --out cert-self --quiet");
ignore_result(system("ipsec scepclient --out pkcs1 --out cert-self --quiet"));
seteuid(0);
setegid(0);
@@ -195,7 +195,7 @@ static void generate_selfcert()
fprintf(f, ": RSA myKey.der\n");
fclose(f);
}
chown(SECRETS_FILE, uid, gid);
ignore_result(chown(SECRETS_FILE, uid, gid));
umask(oldmask);
}
}