All of lore.kernel.org
 help / color / mirror / Atom feed
From: meyering@sourceware.org
To: dm-cvs@sourceware.org, dm-devel@redhat.com
Subject: device-mapper ./WHATS_NEW dmsetup/dmsetup.c
Date: 18 Jun 2008 10:19:25 -0000	[thread overview]
Message-ID: <20080618101925.31080.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/dm
Module name:	device-mapper
Changes by:	meyering@sourceware.org	2008-06-18 10:19:25

Modified files:
	.              : WHATS_NEW 
	dmsetup        : dmsetup.c 

Log message:
	avoid compiler warning about cast in OFFSET_OF macro
	
	* dmsetup/dmsetup.c (OFFSET_OF): Use an equivalent definition
	that does not cast a pointer value to a narrower type.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/device-mapper/WHATS_NEW.diff?cvsroot=dm&r1=1.241&r2=1.242
http://sourceware.org/cgi-bin/cvsweb.cgi/device-mapper/dmsetup/dmsetup.c.diff?cvsroot=dm&r1=1.108&r2=1.109

--- device-mapper/WHATS_NEW	2008/06/10 11:19:18	1.241
+++ device-mapper/WHATS_NEW	2008/06/18 10:19:25	1.242
@@ -1,5 +1,6 @@
 Version 1.02.27 -
 ===============================
+  Avoid compiler warning about cast in dmsetup.c's OFFSET_OF macro.
   Fix inverted no_flush debug message.
   Remove --enable-jobs from configure. (Set at runtime instead.)
   Bring configure.in and list.h into line with the lvm2 versions.
--- device-mapper/dmsetup/dmsetup.c	2008/06/06 18:53:08	1.108
+++ device-mapper/dmsetup/dmsetup.c	2008/06/18 10:19:25	1.109
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
- * Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
  * Copyright (C) 2005-2007 NEC Corporation
  *
  * This file is part of the device-mapper userspace tools.
@@ -1927,7 +1927,7 @@
 };
 
 /* Column definitions */
-#define OFFSET_OF(strct, field) ((unsigned int) &((struct strct *)NULL)->field)
+#define OFFSET_OF(strct, field) (((char*)&((struct strct*)0)->field) - (char*)0)
 #define STR (DM_REPORT_FIELD_TYPE_STRING)
 #define NUM (DM_REPORT_FIELD_TYPE_NUMBER)
 #define FIELD_O(type, strct, sorttype, head, field, width, func, id, desc) {DR_ ## type, sorttype, OFFSET_OF(strct, field), width, id, head, &_ ## func ## _disp, desc},

             reply	other threads:[~2008-06-18 10:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-18 10:19 meyering [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-06-06 18:53 device-mapper ./WHATS_NEW dmsetup/dmsetup.c agk
2008-04-21 13:16 agk
2008-04-21 11:59 agk
2007-06-19 15:47 agk
2007-06-15 18:20 agk
2007-06-11 13:20 agk
2007-04-27 15:12 agk
2007-01-29 18:18 agk
2007-01-29 17:45 agk
2007-01-24 18:09 agk
2006-10-19 15:34 agk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080618101925.31080.qmail@sourceware.org \
    --to=meyering@sourceware.org \
    --cc=dm-cvs@sourceware.org \
    --cc=dm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.