- add and use ATTRIBUTE_ALIGNED(num_bytes)
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Tue, 31 Jan 2006 09:53:53 +0000 (09:53 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Tue, 31 Jan 2006 09:53:53 +0000 (09:53 -0000)
- remove unused parameter pindex from fdisk.c, xbsd_initlabel()

include/platform.h
networking/traceroute.c
util-linux/fdisk.c

index 763292d7a21d06382c4c4598784b03d8ce1217ac..773d6b8b22cb380afc5fc34a9f83884a73397f14 100644 (file)
 #define ATTRIBUTE_PACKED __attribute__ ((__packed__))
 #endif /* ATTRIBUTE_NORETURN */
 
+#ifndef ATTRIBUTE_ALIGNED
+#define ATTRIBUTE_ALIGNED(m) __attribute__ ((__aligned__(m)))
+#endif /* ATTRIBUTE_ALIGNED */
+
 /* -fwhole-program makes all symbols local. The attribute externally_visible
    forces a symbol global.  */
 #ifndef ATTRIBUTE_EXTERNALLY_VISIBLE
index 95aa290a1f864fdf35fa33c319cb4dfba365be35..a9292a284b319b2e732b7cf3f69d72a7cc5cab87 100644 (file)
@@ -293,7 +293,7 @@ struct IFADDRLIST {
 static const char route[] = "/proc/net/route";
 
 /* last inbound (icmp) packet */
-static u_char  packet[512] __attribute__((aligned (32)));
+static u_char  packet[512] ATTRIBUTE_ALIGNED(32);
 
 static struct ip *outip;               /* last output (udp) packet */
 static struct udphdr *outudp;          /* last output (udp) packet */
index 48bea42c953e43fb6027c2cfb372377713613f09..886b2695b1b25a744fc684a7d470c84dcc044323 100644 (file)
@@ -867,8 +867,7 @@ static int xbsd_get_part_index (int max);
 static int xbsd_check_new_partition (int *i);
 static void xbsd_list_types (void);
 static u_short xbsd_dkcksum (struct xbsd_disklabel *lp);
-static int xbsd_initlabel  (struct partition *p, struct xbsd_disklabel *d,
-                           int pindex);
+static int xbsd_initlabel  (struct partition *p, struct xbsd_disklabel *d);
 static int xbsd_readlabel  (struct partition *p, struct xbsd_disklabel *d);
 static int xbsd_writelabel (struct partition *p, struct xbsd_disklabel *d);
 
@@ -885,7 +884,7 @@ static int xbsd_part_index;
 
 #if defined (__alpha__)
 /* We access this through a uint64_t * when checksumming */
-static char disklabelbuffer[BSD_BBSIZE] __attribute__((aligned(8)));
+static char disklabelbuffer[BSD_BBSIZE] ATTRIBUTE_ALIGNED(8);
 #else
 static char disklabelbuffer[BSD_BBSIZE];
 #endif
@@ -1223,9 +1222,9 @@ xbsd_create_disklabel (void) {
                        if (xbsd_initlabel (
 #if defined (__alpha__) || defined (__powerpc__) || defined (__hppa__) || \
     defined (__s390__) || defined (__s390x__)
-                               NULL, &xbsd_dlabel, 0
+                               NULL, &xbsd_dlabel
 #else
-                               xbsd_part, &xbsd_dlabel, xbsd_part_index
+                               xbsd_part, &xbsd_dlabel/* not used, xbsd_part_index*/
 #endif
                                ) == 1) {
                                xbsd_print_disklabel (1);
@@ -1454,7 +1453,7 @@ xbsd_dkcksum (struct xbsd_disklabel *lp) {
 }
 
 static int
-xbsd_initlabel (struct partition *p, struct xbsd_disklabel *d, int pindex) {
+xbsd_initlabel (struct partition *p, struct xbsd_disklabel *d) {
        struct xbsd_partition *pp;
 
        get_geometry ();