branch Attitude Adjustment packages
[12.09/packages.git] / net / pepperspot / patches / 110-fix-compile.patch
1 --- a/src/cmdline.c
2 +++ b/src/cmdline.c
3 @@ -1335,7 +1335,7 @@ cmdline_parser_required (struct gengetop
4  #endif
5  
6  int
7 -cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required, const char *additional_error)
8 +cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required __attribute__((__unused__)), const char *additional_error)
9  {
10    int c;  /* Character of the parsed option.  */
11    char *multi_token, *multi_next; /* for multiple options */
12 --- a/src/ippool.c
13 +++ b/src/ippool.c
14 @@ -267,7 +267,7 @@ void ippool_getv6suffix(struct in6_addr
15  
16  /* Get IP address and mask */
17  int ippool_aton(struct in_addr *addr, struct in_addr *mask,
18 -                char *pool, int number)
19 +                char *pool, int number __attribute__((__unused__)))
20  {
21    /* Parse only first instance of network for now */
22    /* Eventually "number" will indicate the token which we want to parse */
23 --- a/src/pepper.c
24 +++ b/src/pepper.c
25 @@ -3305,7 +3305,7 @@ static int dnprot_accept(struct app_conn
26   * \return 0
27   * \author Sebastien Vincent
28   */
29 -static int cb_tun6_ind(struct tun6_t* tun_obj, void* pack, unsigned len)
30 +static int cb_tun6_ind(struct tun6_t* tun_obj __attribute__((__unused__)), void* pack, unsigned len)
31  {
32    struct ippoolm_t* ipm = NULL;
33    struct in6_addr dst;
34 @@ -3377,7 +3377,7 @@ static int cb_tun6_ind(struct tun6_t* tu
35   * \param len data length
36   * \return 0
37   */
38 -int cb_tun_ind(struct tun_t *tun_obj, void *pack, unsigned len)
39 +int cb_tun_ind(struct tun_t *tun_obj __attribute__((__unused__)), void *pack, unsigned len)
40  {
41    struct ippoolm_t *ipm = NULL;
42    struct in_addr dst;
43 @@ -3459,7 +3459,7 @@ int cb_tun_ind(struct tun_t *tun_obj, vo
44   * \param conn redir connection that we will filled up up-to-date value
45   * \return 0 if success, -1 otherwise
46   */
47 -static int cb_redir_getstate(struct redir_t *redir_obj, struct in_addr *addr,
48 +static int cb_redir_getstate(struct redir_t *redir_obj __attribute__((__unused__)), struct in_addr *addr,
49                               struct redir_conn_t *conn)
50  {
51    struct ippoolm_t *ipm = NULL;
52 @@ -3524,7 +3524,7 @@ static int cb_redir_getstate(struct redi
53   * \param conn redir connection that we will filled up up-to-date value
54   * \return 0 if success, -1 otherwise
55   */
56 -static int cb_redir_getstatev6(struct redir_t* redir_obj, struct in6_addr* addr, struct redir_conn_t* conn)
57 +static int cb_redir_getstatev6(struct redir_t* redir_obj __attribute__((__unused__)), struct in6_addr* addr, struct redir_conn_t* conn)
58  {
59    struct ippoolm_t *ipm = NULL;
60    struct app_conn_t *appconn = NULL;
61 @@ -4354,9 +4354,9 @@ int upprot_getipv6(struct app_conn_t *ap
62   * \param pack_req packet for request
63   * \return 0 if success, -1 otherwise
64   */
65 -int radius_conf(struct radius_t *radius_obj,
66 +int radius_conf(struct radius_t *radius_obj __attribute__((__unused__)),
67                  struct radius_packet_t *pack,
68 -                struct radius_packet_t *pack_req)
69 +                struct radius_packet_t *pack_req __attribute__((__unused__)))
70  {
71    struct radius_attr_t *attr = NULL;
72  
73 --- a/src/tun.c
74 +++ b/src/tun.c
75 @@ -226,7 +226,7 @@ int tun_addaddr(struct tun_t *this,
76    struct sockaddr_nl local;
77    int addr_len = 0;
78    int fd = -1;
79 -  int status = 0;
80 +  int status __attribute__((__unused__)) = 0;
81  
82    struct sockaddr_nl nladdr;
83    struct iovec iov;
84 @@ -507,7 +507,7 @@ int tun_setaddr(struct tun_t *this,
85   * \param delete 1 = delete route, 0 = add route
86   * \return 0 if success, -1 otherwise
87   */
88 -static int tun_route(struct tun_t *this,
89 +static int tun_route(struct tun_t *this __attribute__((__unused__)),
90                       struct in_addr *dst,
91                       struct in_addr *gateway,
92                       struct in_addr *mask,
93 --- a/src/dhcp.c
94 +++ b/src/dhcp.c
95 @@ -2111,7 +2111,7 @@ int dhcp_timeout(struct dhcp_t *this)
96    return 0;
97  }
98  
99 -struct timeval* dhcp_timeleft(struct dhcp_t *this, struct timeval *tvp)
100 +struct timeval* dhcp_timeleft(struct dhcp_t *this __attribute__((__unused__)), struct timeval *tvp)
101  {
102    /* To avoid unused parameter warning */
103    this = NULL;
104 @@ -2640,7 +2640,7 @@ static int dhcp_gettag(struct dhcp_packe
105   * \return 0 if success, -1 otherwise4
106   */
107  static int dhcp_sendOFFER(struct dhcp_conn_t *conn,
108 -                          struct dhcp_fullpacket_t *pack, int len)
109 +                          struct dhcp_fullpacket_t *pack, int len __attribute__((__unused__)))
110  {
111    struct dhcp_t *this = conn->parent;
112    struct dhcp_fullpacket_t packet;
113 @@ -2762,7 +2762,7 @@ static int dhcp_sendOFFER(struct dhcp_co
114   * \return 0 if success, -1 otherwise
115   */
116  static int dhcp_sendACK(struct dhcp_conn_t *conn,
117 -                        struct dhcp_fullpacket_t *pack, int len)
118 +                        struct dhcp_fullpacket_t *pack, int len __attribute__((__unused__)))
119  {
120    struct dhcp_t *this = conn->parent;
121    struct dhcp_fullpacket_t packet;
122 @@ -2895,7 +2895,7 @@ static int dhcp_sendACK(struct dhcp_conn
123   * \return 0 if success, -1 otherwise
124   */
125  static int dhcp_sendNAK(struct dhcp_conn_t *conn,
126 -                        struct dhcp_fullpacket_t *pack, int len)
127 +                        struct dhcp_fullpacket_t *pack, int len __attribute__((__unused__)))
128  {
129    struct dhcp_t *this = conn->parent;
130    struct dhcp_fullpacket_t packet;
131 @@ -3496,7 +3496,7 @@ int dhcp_data_req(struct dhcp_conn_t *co
132   * \return 0
133   */
134  static int dhcp_sendARP(struct dhcp_conn_t *conn,
135 -                        struct dhcp_arp_fullpacket_t *pack, int len)
136 +                        struct dhcp_arp_fullpacket_t *pack, int len __attribute__((__unused__)))
137  {
138    struct dhcp_t *this = conn->parent;
139    struct dhcp_arp_fullpacket_t packet;
140 --- a/src/radius.c
141 +++ b/src/radius.c
142 @@ -210,7 +210,7 @@ static int radius_acctreq_authenticator(
143   * \param secretlen length of secret
144   * \return 0
145   */
146 -static int radius_authresp_authenticator(struct radius_t *this,
147 +static int radius_authresp_authenticator(struct radius_t *this __attribute__((__unused__)),
148                                    struct radius_packet_t *pack,
149                                    uint8_t *req_auth,
150                                    char *secret, int secretlen)
151 @@ -801,7 +801,7 @@ int radius_addattr(struct radius_t *this
152    return 0;
153  }
154  
155 -int radius_addattrv6(struct radius_t *this, struct radius_packet_t *pack,
156 +int radius_addattrv6(struct radius_t *this __attribute__((__unused__)), struct radius_packet_t *pack,
157                   uint8_t type, uint32_t vendor_id, uint8_t vendor_type,
158                   struct in6_addr value, uint8_t *data, uint16_t dlen)
159  {
160 @@ -1124,7 +1124,7 @@ int radius_getattrv6(struct radius_packe
161    return 0;
162  }
163  
164 -int radius_keydecode(struct radius_t *this, uint8_t *dst, int dstsize,
165 +int radius_keydecode(struct radius_t *this __attribute__((__unused__)), uint8_t *dst, int dstsize,
166                       int *dstlen, uint8_t *src, int srclen,
167                       uint8_t *authenticator, char *secret, int secretlen)
168  {
169 @@ -1346,7 +1346,7 @@ int radius_pwdecode(struct radius_t *thi
170    return 0;
171  }
172  
173 -int radius_pwencode(struct radius_t *this, uint8_t *dst, int dstsize,
174 +int radius_pwencode(struct radius_t *this __attribute__((__unused__)), uint8_t *dst, int dstsize,
175                      int *dstlen, uint8_t *src, int srclen,
176                      uint8_t *authenticator, char *secret, int secretlen)
177  {
178 --- a/src/redir.c
179 +++ b/src/redir.c
180 @@ -974,7 +974,7 @@ void redir_set(struct redir_t *redir, in
181   * \param dstsize size of dst
182   * \return 0 if success, -1 otherwise
183   */
184 -static int redir_getpath(struct redir_t *redir, char *src, char *dst, int dstsize)
185 +static int redir_getpath(struct redir_t *redir __attribute__((__unused__)), char *src, char *dst, int dstsize)
186  {
187    char *p1 = NULL;
188    char *p2 = NULL;
189 @@ -1045,7 +1045,7 @@ static int redir_getpath(struct redir_t
190  /**
191   * \brief Get the url of an HTTP request.
192   */
193 -static int redir_geturl(struct redir_t *redir, char *src, char *dst, int dstsize)
194 +static int redir_geturl(struct redir_t *redir __attribute__((__unused__)), char *src, char *dst, int dstsize)
195  {
196    char *p1 = NULL;
197    char *p3 = NULL;
198 @@ -1128,7 +1128,7 @@ static int redir_geturl(struct redir_t *
199   * \return 0 if found, -1 otherwise (not found, malformed HTTP response)
200   */
201  /* TODO: Should be merged with other parsers */
202 -static int redir_getparam(struct redir_t *redir, char *src,
203 +static int redir_getparam(struct redir_t *redir __attribute__((__unused__)), char *src,
204                            char *param,
205                            char *dst, int dstsize)
206  {
207 @@ -1362,9 +1362,9 @@ static int redir_getreq(struct redir_t *
208   * \param cbp pointer for callback
209   * \return 0
210   */
211 -static int redir_cb_radius_auth_conf(struct radius_t *radius,
212 +static int redir_cb_radius_auth_conf(struct radius_t *radius __attribute__((__unused__)),
213                                       struct radius_packet_t *pack,
214 -                                     struct radius_packet_t *pack_req, void *cbp)
215 +                                     struct radius_packet_t *pack_req __attribute__((__unused__)), void *cbp)
216  {
217    struct radius_attr_t *interimattr = NULL;
218    struct radius_attr_t *stateattr = NULL;
219 @@ -1696,7 +1696,7 @@ static int redir_cb_radius_auth_conf(str
220   * \param conn redir connection
221   * \return 0 if success, -1 otherwise
222   */
223 -static int redir_radius(struct redir_t *redir, struct sockaddr_storage *addr,
224 +static int redir_radius(struct redir_t *redir, struct sockaddr_storage *addr __attribute__((__unused__)),
225                          struct redir_conn_t *conn)
226  {
227    struct radius_t *radius = NULL;      /* Radius client instance */
228 --- a/src/tun6.c
229 +++ b/src/tun6.c
230 @@ -1080,7 +1080,7 @@ int tun6_setaddr(struct tun6_t *this, st
231    return code;
232  }
233  
234 -int tun6_addroute(struct tun6_t *this, struct in6_addr *dst, struct in6_addr *gateway, uint8_t prefixlen)
235 +int tun6_addroute(struct tun6_t *this __attribute__((__unused__)), struct in6_addr *dst __attribute__((__unused__)), struct in6_addr *gateway __attribute__((__unused__)), uint8_t prefixlen __attribute__((__unused__)))
236  {
237    /* TODO : use _iface_route */
238    this = NULL;
239 @@ -1096,7 +1096,7 @@ int tun6_set_cb_ind(struct tun6_t *this,
240    return 0;
241  }
242  
243 -int tun6_runscript(struct tun6_t *tun, char* script)
244 +int tun6_runscript(struct tun6_t *tun __attribute__((__unused__)), char* script __attribute__((__unused__)))
245  {
246    /* TODO */
247    tun = NULL;