gcc is rather over-aggressive about optimising out static data structures

even when __atribute__ (( unused )) is correctly set...
This commit is contained in:
Michael Brown
2006-04-24 18:31:37 +00:00
parent 4c4e4de18f
commit 832e86246b
21 changed files with 35 additions and 35 deletions
+1 -1
View File
@@ -355,7 +355,7 @@ static int dns_resolv ( struct in_addr *addr, const char *name ) {
}
}
static struct resolver dns_resolver __resolver = {
struct resolver dns_resolver __resolver = {
.name = "DNS",
.resolv = dns_resolv,
};
+1 -1
View File
@@ -166,7 +166,7 @@ static int http ( char *url, struct sockaddr_in *server __unused,
return 1;
}
static struct protocol http_protocol __protocol = {
struct protocol http_protocol __protocol = {
.name = "http",
.default_port = 80,
.load = http,
+1 -1
View File
@@ -112,7 +112,7 @@ static void process_igmp ( unsigned long now, unsigned short ptype __unused,
}
}
static struct background igmp_background __background = {
struct background igmp_background __background = {
.send = send_igmp_reports,
.process = process_igmp,
};
+1 -1
View File
@@ -610,7 +610,7 @@ nfssymlink:
INIT_FN ( INIT_RPC, rpc_init, nfs_reset, nfs_reset );
static struct protocol nfs_protocol __protocol = {
struct protocol nfs_protocol __protocol = {
.name = "nfs",
.default_port = SUNRPC_PORT,
.load = nfs,
+1 -1
View File
@@ -100,7 +100,7 @@ static int nmb_resolv ( struct in_addr *addr, const char *name ) {
return 1;
}
static struct resolver nmb_resolver __resolver = {
struct resolver nmb_resolver __resolver = {
.name = "NMB",
.resolv = nmb_resolv,
};
+1 -1
View File
@@ -534,7 +534,7 @@ static int url_slam ( char *url __unused, struct sockaddr_in *server,
return proto_slam(&info);
}
static struct protocol slam_protocol __protocol = {
struct protocol slam_protocol __protocol = {
.name = "x-slam",
.default_port = SLAM_PORT,
.load = url_slam,