aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-01-30 17:17:14 +0000
committeraldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-01-30 17:17:14 +0000
commite3206585f41ad674d5d6f9f04f4cb50efdc21119 (patch)
treec47584ea54140cdd66f0833c8202875e8f4fe844
parent1384f29bcb54c994159c68508b9c359d7d2abc6a (diff)
downloadbusybox-w32-e3206585f41ad674d5d6f9f04f4cb50efdc21119.tar.gz
busybox-w32-e3206585f41ad674d5d6f9f04f4cb50efdc21119.tar.bz2
busybox-w32-e3206585f41ad674d5d6f9f04f4cb50efdc21119.zip
- add some ATTRIBUTE_UNUSED.
- use shorter boilerplate while at it. git-svn-id: svn://busybox.net/trunk/busybox@13718 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--archival/gzip.c17
-rw-r--r--archival/rpm.c16
-rw-r--r--coreutils/chmod.c17
-rw-r--r--coreutils/chown.c3
-rw-r--r--coreutils/false.c17
-rw-r--r--coreutils/hostid.c17
-rw-r--r--coreutils/logname.c17
-rw-r--r--libbb/bb_askpass.c18
-rw-r--r--libbb/bb_echo.c16
-rw-r--r--miscutils/rx.c17
-rw-r--r--miscutils/watchdog.c2
-rw-r--r--networking/libiproute/ipaddress.c11
-rw-r--r--networking/libiproute/utils.c9
13 files changed, 31 insertions, 146 deletions
diff --git a/archival/gzip.c b/archival/gzip.c
index 1f268dd26..783a453a7 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -13,20 +13,7 @@
13 * files as well as stdin/stdout, and to generally behave itself wrt 13 * files as well as stdin/stdout, and to generally behave itself wrt
14 * command line handling. 14 * command line handling.
15 * 15 *
16 * This program is free software; you can redistribute it and/or modify 16 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 * General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, write to the Free Software
28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 *
30 */ 17 */
31 18
32/* These defines are very important for BusyBox. Without these, 19/* These defines are very important for BusyBox. Without these,
@@ -322,7 +309,7 @@ static void put_short(ush w)
322/* ======================================================================== 309/* ========================================================================
323 * Signal and error handler. 310 * Signal and error handler.
324 */ 311 */
325static void abort_gzip(int ignored) 312static void abort_gzip(int ATTRIBUTE_UNUSED ignored)
326{ 313{
327 exit(ERROR); 314 exit(ERROR);
328} 315}
diff --git a/archival/rpm.c b/archival/rpm.c
index a80f799a6..88e748550 100644
--- a/archival/rpm.c
+++ b/archival/rpm.c
@@ -4,19 +4,7 @@
4 * 4 *
5 * Copyright (C) 2001,2002 by Laurence Anderson 5 * Copyright (C) 2001,2002 by Laurence Anderson
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */ 8 */
21 9
22#include <stdio.h> 10#include <stdio.h>
@@ -336,7 +324,7 @@ void fileaction_setowngrp(char *filename, int fileref)
336 chown (filename, uid, gid); 324 chown (filename, uid, gid);
337} 325}
338 326
339void fileaction_list(char *filename, int fileref) 327void fileaction_list(char *filename, int ATTRIBUTE_UNUSED fileref)
340{ 328{
341 printf("%s\n", filename); 329 printf("%s\n", filename);
342} 330}
diff --git a/coreutils/chmod.c b/coreutils/chmod.c
index 3014d374a..b69cccdf1 100644
--- a/coreutils/chmod.c
+++ b/coreutils/chmod.c
@@ -7,20 +7,7 @@
7 * Reworked by (C) 2002 Vladimir Oleynik <dzo@simtreas.ru> 7 * Reworked by (C) 2002 Vladimir Oleynik <dzo@simtreas.ru>
8 * to correctly parse '-rwxgoa' 8 * to correctly parse '-rwxgoa'
9 * 9 *
10 * This program is free software; you can redistribute it and/or modify 10 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 *
24 */ 11 */
25 12
26/* BB_AUDIT SUSv3 compliant */ 13/* BB_AUDIT SUSv3 compliant */
@@ -44,7 +31,7 @@ static int fileAction(const char *fileName, struct stat *statbuf, void* junk)
44 return (FALSE); 31 return (FALSE);
45} 32}
46 33
47int chmod_main(int argc, char **argv) 34int chmod_main(int ATTRIBUTE_UNUSED argc, char **argv)
48{ 35{
49 int retval = EXIT_SUCCESS; 36 int retval = EXIT_SUCCESS;
50 int recursiveFlag = FALSE; 37 int recursiveFlag = FALSE;
diff --git a/coreutils/chown.c b/coreutils/chown.c
index 888c3fc89..660d08947 100644
--- a/coreutils/chown.c
+++ b/coreutils/chown.c
@@ -22,7 +22,8 @@ static gid_t gid = -1;
22 22
23static int (*chown_func)(const char *, uid_t, gid_t) = chown; 23static int (*chown_func)(const char *, uid_t, gid_t) = chown;
24 24
25static int fileAction(const char *fileName, struct stat *statbuf, void* junk) 25static int fileAction(const char *fileName, struct stat *statbuf,
26 void ATTRIBUTE_UNUSED *junk)
26{ 27{
27 if (!chown_func(fileName, 28 if (!chown_func(fileName,
28 (uid == -1) ? statbuf->st_uid : uid, 29 (uid == -1) ? statbuf->st_uid : uid,
diff --git a/coreutils/false.c b/coreutils/false.c
index 5cf238409..b06ef8b62 100644
--- a/coreutils/false.c
+++ b/coreutils/false.c
@@ -4,20 +4,7 @@
4 * 4 *
5 * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> 5 * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 */ 8 */
22 9
23/* BB_AUDIT SUSv3 compliant */ 10/* BB_AUDIT SUSv3 compliant */
@@ -26,7 +13,7 @@
26#include <stdlib.h> 13#include <stdlib.h>
27#include "busybox.h" 14#include "busybox.h"
28 15
29extern int false_main(int argc, char **argv) 16extern int false_main(int ATTRIBUTE_UNUSED argc, char ATTRIBUTE_UNUSED **argv)
30{ 17{
31 return EXIT_FAILURE; 18 return EXIT_FAILURE;
32} 19}
diff --git a/coreutils/hostid.c b/coreutils/hostid.c
index 917dc223e..0c11ca385 100644
--- a/coreutils/hostid.c
+++ b/coreutils/hostid.c
@@ -4,20 +4,7 @@
4 * 4 *
5 * Copyright (C) 2000 Edward Betts <edward@debian.org>. 5 * Copyright (C) 2000 Edward Betts <edward@debian.org>.
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 */ 8 */
22 9
23/* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */ 10/* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */
@@ -26,7 +13,7 @@
26#include <unistd.h> 13#include <unistd.h>
27#include "busybox.h" 14#include "busybox.h"
28 15
29extern int hostid_main(int argc, char **argv) 16extern int hostid_main(int argc, char ATTRIBUTE_UNUSED **argv)
30{ 17{
31 if (argc > 1) { 18 if (argc > 1) {
32 bb_show_usage(); 19 bb_show_usage();
diff --git a/coreutils/logname.c b/coreutils/logname.c
index ca5eb41cf..e2a74f932 100644
--- a/coreutils/logname.c
+++ b/coreutils/logname.c
@@ -4,20 +4,7 @@
4 * 4 *
5 * Copyright (C) 2000 Edward Betts <edward@debian.org>. 5 * Copyright (C) 2000 Edward Betts <edward@debian.org>.
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 */ 8 */
22 9
23/* BB_AUDIT SUSv3 compliant */ 10/* BB_AUDIT SUSv3 compliant */
@@ -38,7 +25,7 @@
38#include <unistd.h> 25#include <unistd.h>
39#include "busybox.h" 26#include "busybox.h"
40 27
41extern int logname_main(int argc, char **argv) 28extern int logname_main(int argc, char ATTRIBUTE_UNUSED **argv)
42{ 29{
43 const char *p; 30 const char *p;
44 31
diff --git a/libbb/bb_askpass.c b/libbb/bb_askpass.c
index 42ccd66d3..65ddd5a24 100644
--- a/libbb/bb_askpass.c
+++ b/libbb/bb_askpass.c
@@ -5,19 +5,7 @@
5 * 5 *
6 * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> 6 * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */ 9 */
22 10
23#include <stdio.h> 11#include <stdio.h>
@@ -27,11 +15,13 @@
27#include <signal.h> 15#include <signal.h>
28#include <termios.h> 16#include <termios.h>
29#include <sys/ioctl.h> 17#include <sys/ioctl.h>
18
19#include "libbb.h"
30#define PWD_BUFFER_SIZE 256 20#define PWD_BUFFER_SIZE 256
31 21
32 22
33/* do nothing signal handler */ 23/* do nothing signal handler */
34static void askpass_timeout(int ignore) 24static void askpass_timeout(int ATTRIBUTE_UNUSED ignore)
35{ 25{
36} 26}
37 27
diff --git a/libbb/bb_echo.c b/libbb/bb_echo.c
index 387ee9669..41e6e4915 100644
--- a/libbb/bb_echo.c
+++ b/libbb/bb_echo.c
@@ -5,19 +5,7 @@
5 * Copyright (c) 1991, 1993 5 * Copyright (c) 1991, 1993
6 * The Regents of the University of California. All rights reserved. 6 * The Regents of the University of California. All rights reserved.
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 * 9 *
22 * Original copyright notice is retained at the end of this file. 10 * Original copyright notice is retained at the end of this file.
23 */ 11 */
@@ -40,7 +28,7 @@
40#include <string.h> 28#include <string.h>
41#include "busybox.h" 29#include "busybox.h"
42 30
43extern int bb_echo(int argc, char** argv) 31extern int bb_echo(int ATTRIBUTE_UNUSED argc, char **argv)
44{ 32{
45#ifndef CONFIG_FEATURE_FANCY_ECHO 33#ifndef CONFIG_FEATURE_FANCY_ECHO
46#define eflag '\\' 34#define eflag '\\'
diff --git a/miscutils/rx.c b/miscutils/rx.c
index 8edc8877a..c7e82ead5 100644
--- a/miscutils/rx.c
+++ b/miscutils/rx.c
@@ -13,20 +13,7 @@
13 * 13 *
14 * Copyright (C) 2001 Hewlett-Packard Laboratories 14 * Copyright (C) 2001 Hewlett-Packard Laboratories
15 * 15 *
16 * This program is free software; you can redistribute it and/or modify 16 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, write to the Free Software
28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 *
30 * 17 *
31 * This was originally written for blob and then adapted for busybox. 18 * This was originally written for blob and then adapted for busybox.
32 * 19 *
@@ -285,7 +272,7 @@ static int receive(char *error_buf, size_t error_buf_size,
285#undef note_error 272#undef note_error
286} 273}
287 274
288static void sigalrm_handler(int signum) 275static void sigalrm_handler(int ATTRIBUTE_UNUSED signum)
289{ 276{
290} 277}
291 278
diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c
index 944288d29..55dd69857 100644
--- a/miscutils/watchdog.c
+++ b/miscutils/watchdog.c
@@ -20,7 +20,7 @@ static unsigned int timer_duration = 30;
20/* Watchdog file descriptor */ 20/* Watchdog file descriptor */
21static int fd; 21static int fd;
22 22
23static void watchdog_shutdown(int unused) 23static void watchdog_shutdown(int ATTRIBUTE_UNUSED unused)
24{ 24{
25 write(fd, "V", 1); /* Magic */ 25 write(fd, "V", 1); /* Magic */
26 close(fd); 26 close(fd);
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c
index c5e6e4ea5..12b8fc8f8 100644
--- a/networking/libiproute/ipaddress.c
+++ b/networking/libiproute/ipaddress.c
@@ -1,10 +1,7 @@
1/* 1/*
2 * ipaddress.c "ip address". 2 * ipaddress.c "ip address".
3 * 3 *
4 * This program is free software; you can redistribute it and/or 4 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 * 5 *
9 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> 6 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
10 * 7 *
@@ -103,7 +100,8 @@ static void print_queuelen(char *name)
103 printf("qlen %d", ifr.ifr_qlen); 100 printf("qlen %d", ifr.ifr_qlen);
104} 101}
105 102
106static int print_linkinfo(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) 103static int print_linkinfo(struct sockaddr_nl ATTRIBUTE_UNUSED *who,
104 struct nlmsghdr *n, void ATTRIBUTE_UNUSED *arg)
107{ 105{
108 FILE *fp = (FILE*)arg; 106 FILE *fp = (FILE*)arg;
109 struct ifinfomsg *ifi = NLMSG_DATA(n); 107 struct ifinfomsg *ifi = NLMSG_DATA(n);
@@ -205,7 +203,8 @@ static int flush_update(void)
205 return 0; 203 return 0;
206} 204}
207 205
208static int print_addrinfo(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) 206static int print_addrinfo(struct sockaddr_nl ATTRIBUTE_UNUSED *who,
207 struct nlmsghdr *n, void ATTRIBUTE_UNUSED *arg)
209{ 208{
210 FILE *fp = (FILE*)arg; 209 FILE *fp = (FILE*)arg;
211 struct ifaddrmsg *ifa = NLMSG_DATA(n); 210 struct ifaddrmsg *ifa = NLMSG_DATA(n);
diff --git a/networking/libiproute/utils.c b/networking/libiproute/utils.c
index e6b386c1d..0dd5d9519 100644
--- a/networking/libiproute/utils.c
+++ b/networking/libiproute/utils.c
@@ -1,14 +1,10 @@
1/* 1/*
2 * utils.c 2 * utils.c
3 * 3 *
4 * This program is free software; you can redistribute it and/or 4 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 * 5 *
9 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> 6 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
10 * 7 *
11 *
12 * Changes: 8 * Changes:
13 * 9 *
14 * Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses 10 * Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses
@@ -321,7 +317,8 @@ int __get_hz(void)
321 return sysconf(_SC_CLK_TCK); 317 return sysconf(_SC_CLK_TCK);
322} 318}
323 319
324const char *rt_addr_n2a(int af, int len, void *addr, char *buf, int buflen) 320const char *rt_addr_n2a(int af, int ATTRIBUTE_UNUSED len,
321 void *addr, char *buf, int buflen)
325{ 322{
326 switch (af) { 323 switch (af) {
327 case AF_INET: 324 case AF_INET: