Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/nc Mark help as static+dead. Don't use __attribute__.



details:   https://anonhg.NetBSD.org/src/rev/4230626a73ba
branches:  trunk
changeset: 821573:4230626a73ba
user:      joerg <joerg%NetBSD.org@localhost>
date:      Thu Feb 09 20:37:58 2017 +0000

description:
Mark help as static+dead. Don't use __attribute__.
XXX needs a lot more static love. Uses mktemp and doesn't link.

diffstat:

 usr.bin/nc/netcat.c |  6 +++---
 usr.bin/nc/socks.c  |  4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diffs (47 lines):

diff -r 6e879203d6a0 -r 4230626a73ba usr.bin/nc/netcat.c
--- a/usr.bin/nc/netcat.c       Thu Feb 09 20:32:19 2017 +0000
+++ b/usr.bin/nc/netcat.c       Thu Feb 09 20:37:58 2017 +0000
@@ -27,7 +27,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: netcat.c,v 1.3 2017/02/09 17:27:30 christos Exp $");
+__RCSID("$NetBSD: netcat.c,v 1.4 2017/02/09 20:37:58 joerg Exp $");
 
 /*
  * Re-written nc(1) for OpenBSD. Original implementation by
@@ -129,11 +129,11 @@
 
 void   atelnet(int, unsigned char *, unsigned int);
 void   build_ports(char *);
-void   help(void);
+static void    help(void) __dead;
 int    local_listen(char *, char *, struct addrinfo);
 struct tls;
 void   readwrite(int, struct tls *);
-void   fdpass(int nfd) __attribute__((noreturn));
+void   fdpass(int nfd) __dead;
 int    remote_connect(const char *, const char *, struct addrinfo);
 int    timeout_connect(int, const struct sockaddr *, socklen_t);
 int    socks_connect(const char *, const char *, struct addrinfo,
diff -r 6e879203d6a0 -r 4230626a73ba usr.bin/nc/socks.c
--- a/usr.bin/nc/socks.c        Thu Feb 09 20:32:19 2017 +0000
+++ b/usr.bin/nc/socks.c        Thu Feb 09 20:37:58 2017 +0000
@@ -25,7 +25,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: socks.c,v 1.2 2017/02/06 16:03:40 christos Exp $");
+__RCSID("$NetBSD: socks.c,v 1.3 2017/02/09 20:37:58 joerg Exp $");
 
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -185,7 +185,7 @@
 
 int
 socks_connect(const char *host, const char *port,
-    struct addrinfo hints __attribute__ ((__unused__)),
+    struct addrinfo hints __unused,
     const char *proxyhost, const char *proxyport, struct addrinfo proxyhints,
     int socksv, const char *proxyuser)
 {



Home | Main Index | Thread Index | Old Index