Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib Kill a bunch of manual __attribute__ usages and replace ...
details: https://anonhg.NetBSD.org/src/rev/c3ba3c5fa3c2
branches: trunk
changeset: 771681:c3ba3c5fa3c2
user: joerg <joerg%NetBSD.org@localhost>
date: Mon Nov 28 12:44:18 2011 +0000
description:
Kill a bunch of manual __attribute__ usages and replace them with the
equivalent sys/cdefs.h invocation.
diffstat:
lib/libbluetooth/bluetooth.h | 6 +++---
lib/libform/form.h | 5 ++---
lib/libisns/isns_pdu.h | 14 +++++++-------
lib/libterminfo/compile.c | 6 +++---
4 files changed, 15 insertions(+), 16 deletions(-)
diffs (100 lines):
diff -r 16b381b82f35 -r c3ba3c5fa3c2 lib/libbluetooth/bluetooth.h
--- a/lib/libbluetooth/bluetooth.h Mon Nov 28 11:46:54 2011 +0000
+++ b/lib/libbluetooth/bluetooth.h Mon Nov 28 12:44:18 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bluetooth.h,v 1.4 2009/08/03 15:59:42 plunky Exp $ */
+/* $NetBSD: bluetooth.h,v 1.5 2011/11/28 12:44:18 joerg Exp $ */
/*-
* Copyright (c) 2001-2009 Maksim Yevmenkin <m_evmenkin%yahoo.com@localhost>
@@ -160,14 +160,14 @@
bdaddr_t laddr; /* local address */
bdaddr_t raddr; /* remote address */
uint8_t time; /* validity (seconds) */
-} __attribute__ ((packed)) bthcid_pin_request_t;
+} __packed bthcid_pin_request_t;
/* Client PIN Response packet */
typedef struct {
bdaddr_t laddr; /* local address */
bdaddr_t raddr; /* remote address */
uint8_t pin[HCI_PIN_SIZE]; /* PIN */
-} __attribute__ ((packed)) bthcid_pin_response_t;
+} __packed bthcid_pin_response_t;
/* Default socket name */
#define BTHCID_SOCKET_NAME "/var/run/bthcid"
diff -r 16b381b82f35 -r c3ba3c5fa3c2 lib/libform/form.h
--- a/lib/libform/form.h Mon Nov 28 11:46:54 2011 +0000
+++ b/lib/libform/form.h Mon Nov 28 12:44:18 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: form.h,v 1.20 2010/02/03 15:34:43 roy Exp $ */
+/* $NetBSD: form.h,v 1.21 2011/11/28 12:44:18 joerg Exp $ */
/*-
* Copyright (c) 1998-1999 Brett Lymn
@@ -355,8 +355,7 @@
int set_field_just(FIELD *, int);
int set_field_opts(FIELD *, Form_Options);
int set_field_pad(FIELD *, int);
-int set_field_printf(FIELD *, int, char *, ...)
- __attribute__((__format__(__printf__, 3, 4)));
+int set_field_printf(FIELD *, int, char *, ...) __printflike(3, 4);
int set_field_status(FIELD *, int);
int set_field_term(FORM *, Form_Hook);
int set_field_type(FIELD *, FIELDTYPE *, ...);
diff -r 16b381b82f35 -r c3ba3c5fa3c2 lib/libisns/isns_pdu.h
--- a/lib/libisns/isns_pdu.h Mon Nov 28 11:46:54 2011 +0000
+++ b/lib/libisns/isns_pdu.h Mon Nov 28 12:44:18 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isns_pdu.h,v 1.2 2011/08/17 10:08:43 christos Exp $ */
+/* $NetBSD: isns_pdu.h,v 1.3 2011/11/28 12:44:18 joerg Exp $ */
/*-
* Copyright (c) 2004,2009 The NetBSD Foundation, Inc.
@@ -171,12 +171,12 @@
};
struct isns_pdu_hdr_s {
- uint16_t isnsp_version __attribute__ ((packed));
- uint16_t func_id __attribute__ ((packed));
- uint16_t payload_len __attribute__ ((packed));
- uint16_t flags __attribute__ ((packed));
- uint16_t trans_id __attribute__ ((packed));
- uint16_t seq_id __attribute__ ((packed));
+ uint16_t isnsp_version __packed;
+ uint16_t func_id __packed;
+ uint16_t payload_len __packed;
+ uint16_t flags __packed;
+ uint16_t trans_id __packed;
+ uint16_t seq_id __packed;
};
struct isns_pdu_s {
diff -r 16b381b82f35 -r c3ba3c5fa3c2 lib/libterminfo/compile.c
--- a/lib/libterminfo/compile.c Mon Nov 28 11:46:54 2011 +0000
+++ b/lib/libterminfo/compile.c Mon Nov 28 12:44:18 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compile.c,v 1.5 2011/04/11 21:37:19 roy Exp $ */
+/* $NetBSD: compile.c,v 1.6 2011/11/28 12:44:19 joerg Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: compile.c,v 1.5 2011/04/11 21:37:19 roy Exp $");
+__RCSID("$NetBSD: compile.c,v 1.6 2011/11/28 12:44:19 joerg Exp $");
#if !HAVE_NBTOOL_CONFIG_H || HAVE_SYS_ENDIAN_H
#include <sys/endian.h>
@@ -51,7 +51,7 @@
#include <term_private.h>
#include <term.h>
-static void __attribute__((__format__(__printf__, 2, 3)))
+static void __printflike(2, 3)
dowarn(int flags, const char *fmt, ...)
{
va_list va;
Home |
Main Index |
Thread Index |
Old Index