OSDN Git Service

- add some ATTRIBUTE_UNUSED.
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mon, 30 Jan 2006 17:17:14 +0000 (17:17 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mon, 30 Jan 2006 17:17:14 +0000 (17:17 -0000)
- use shorter boilerplate while at it.

13 files changed:
archival/gzip.c
archival/rpm.c
coreutils/chmod.c
coreutils/chown.c
coreutils/false.c
coreutils/hostid.c
coreutils/logname.c
libbb/bb_askpass.c
libbb/bb_echo.c
miscutils/rx.c
miscutils/watchdog.c
networking/libiproute/ipaddress.c
networking/libiproute/utils.c

index 1f268dd..783a453 100644 (file)
  * files as well as stdin/stdout, and to generally behave itself wrt
  * command line handling.
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
 /* These defines are very important for BusyBox.  Without these,
@@ -322,7 +309,7 @@ static void put_short(ush w)
 /* ========================================================================
  * Signal and error handler.
  */
-static void abort_gzip(int ignored)
+static void abort_gzip(int ATTRIBUTE_UNUSED ignored)
 {
        exit(ERROR);
 }
index a80f799..88e7485 100644 (file)
@@ -4,19 +4,7 @@
  *
  * Copyright (C) 2001,2002 by Laurence Anderson
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
 #include <stdio.h>
@@ -336,7 +324,7 @@ void fileaction_setowngrp(char *filename, int fileref)
        chown (filename, uid, gid);
 }
 
-void fileaction_list(char *filename, int fileref)
+void fileaction_list(char *filename, int ATTRIBUTE_UNUSED fileref)
 {
        printf("%s\n", filename);
 }
index 3014d37..b69cccd 100644 (file)
@@ -7,20 +7,7 @@
  * Reworked by (C) 2002 Vladimir Oleynik <dzo@simtreas.ru>
  *  to correctly parse '-rwxgoa'
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
 /* BB_AUDIT SUSv3 compliant */
@@ -44,7 +31,7 @@ static int fileAction(const char *fileName, struct stat *statbuf, void* junk)
        return (FALSE);
 }
 
-int chmod_main(int argc, char **argv)
+int chmod_main(int ATTRIBUTE_UNUSED argc, char **argv)
 {
        int retval = EXIT_SUCCESS;
        int recursiveFlag = FALSE;
index 888c3fc..660d089 100644 (file)
@@ -22,7 +22,8 @@ static gid_t gid = -1;
 
 static int (*chown_func)(const char *, uid_t, gid_t) = chown;
 
-static int fileAction(const char *fileName, struct stat *statbuf, void* junk)
+static int fileAction(const char *fileName, struct stat *statbuf,
+               void ATTRIBUTE_UNUSED *junk)
 {
        if (!chown_func(fileName,
                                (uid == -1) ? statbuf->st_uid : uid,
index 5cf2384..b06ef8b 100644 (file)
@@ -4,20 +4,7 @@
  *
  * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
 /* BB_AUDIT SUSv3 compliant */
@@ -26,7 +13,7 @@
 #include <stdlib.h>
 #include "busybox.h"
 
-extern int false_main(int argc, char **argv)
+extern int false_main(int ATTRIBUTE_UNUSED argc, char ATTRIBUTE_UNUSED **argv)
 {
        return EXIT_FAILURE;
 }
index 917dc22..0c11ca3 100644 (file)
@@ -4,20 +4,7 @@
  *
  * Copyright (C) 2000  Edward Betts <edward@debian.org>.
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
 /* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */
@@ -26,7 +13,7 @@
 #include <unistd.h>
 #include "busybox.h"
 
-extern int hostid_main(int argc, char **argv)
+extern int hostid_main(int argc, char ATTRIBUTE_UNUSED **argv)
 {
        if (argc > 1) {
                bb_show_usage();
index ca5eb41..e2a74f9 100644 (file)
@@ -4,20 +4,7 @@
  *
  * Copyright (C) 2000  Edward Betts <edward@debian.org>.
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
 /* BB_AUDIT SUSv3 compliant */
@@ -38,7 +25,7 @@
 #include <unistd.h>
 #include "busybox.h"
 
-extern int logname_main(int argc, char **argv)
+extern int logname_main(int argc, char ATTRIBUTE_UNUSED **argv)
 {
        const char *p;
 
index 42ccd66..65ddd5a 100644 (file)
@@ -5,19 +5,7 @@
  *
  * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
 #include <stdio.h>
 #include <signal.h>
 #include <termios.h>
 #include <sys/ioctl.h>
+
+#include "libbb.h"
 #define PWD_BUFFER_SIZE 256
 
 
 /* do nothing signal handler */
-static void askpass_timeout(int ignore)
+static void askpass_timeout(int ATTRIBUTE_UNUSED ignore)
 {
 }
 
index 387ee96..41e6e49 100644 (file)
@@ -5,19 +5,7 @@
  * Copyright (c) 1991, 1993
  *     The Regents of the University of California.  All rights reserved.
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  *
  * Original copyright notice is retained at the end of this file.
  */
@@ -40,7 +28,7 @@
 #include <string.h>
 #include "busybox.h"
 
-extern int bb_echo(int argc, char** argv)
+extern int bb_echo(int ATTRIBUTE_UNUSED argc, char **argv)
 {
 #ifndef CONFIG_FEATURE_FANCY_ECHO
 #define eflag '\\'
index 8edc887..c7e82ea 100644 (file)
  *
  * Copyright (C) 2001 Hewlett-Packard Laboratories
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  *
  * This was originally written for blob and then adapted for busybox.
  *
@@ -285,7 +272,7 @@ static int receive(char *error_buf, size_t error_buf_size,
 #undef note_error
 }
 
-static void sigalrm_handler(int signum)
+static void sigalrm_handler(int ATTRIBUTE_UNUSED signum)
 {
 }
 
index 944288d..55dd698 100644 (file)
@@ -20,7 +20,7 @@ static unsigned int timer_duration = 30;
 /* Watchdog file descriptor */
 static int fd;
 
-static void watchdog_shutdown(int unused)
+static void watchdog_shutdown(int ATTRIBUTE_UNUSED unused)
 {
        write(fd, "V", 1);      /* Magic */
        close(fd);
index c5e6e4e..12b8fc8 100644 (file)
@@ -1,10 +1,7 @@
 /*
  * ipaddress.c         "ip address".
  *
- *             This program is free software; you can redistribute it and/or
- *             modify it under the terms of the GNU General Public License
- *             as published by the Free Software Foundation; either version
- *             2 of the License, or (at your option) any later version.
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  *
  * Authors:    Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
  *
@@ -103,7 +100,8 @@ static void print_queuelen(char *name)
                printf("qlen %d", ifr.ifr_qlen);
 }
 
-static int print_linkinfo(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
+static int print_linkinfo(struct sockaddr_nl ATTRIBUTE_UNUSED *who,
+               struct nlmsghdr *n, void ATTRIBUTE_UNUSED *arg)
 {
        FILE *fp = (FILE*)arg;
        struct ifinfomsg *ifi = NLMSG_DATA(n);
@@ -205,7 +203,8 @@ static int flush_update(void)
        return 0;
 }
 
-static int print_addrinfo(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
+static int print_addrinfo(struct sockaddr_nl ATTRIBUTE_UNUSED *who,
+               struct nlmsghdr *n, void ATTRIBUTE_UNUSED *arg)
 {
        FILE *fp = (FILE*)arg;
        struct ifaddrmsg *ifa = NLMSG_DATA(n);
index e6b386c..0dd5d95 100644 (file)
@@ -1,14 +1,10 @@
 /*
  * utils.c
  *
- *             This program is free software; you can redistribute it and/or
- *             modify it under the terms of the GNU General Public License
- *             as published by the Free Software Foundation; either version
- *             2 of the License, or (at your option) any later version.
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  *
  * Authors:    Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
  *
- *
  * Changes:
  *
  * Rani Assaf <rani@magic.metawire.com> 980929:        resolve addresses
@@ -321,7 +317,8 @@ int __get_hz(void)
        return sysconf(_SC_CLK_TCK);
 }
 
-const char *rt_addr_n2a(int af, int len, void *addr, char *buf, int buflen)
+const char *rt_addr_n2a(int af, int ATTRIBUTE_UNUSED len,
+               void *addr, char *buf, int buflen)
 {
        switch (af) {
        case AF_INET: