All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 05/10] debugreiserfs: fix dereferencing type-punned pointer warning
@ 2012-10-11 17:23 Jeff Mahoney
  0 siblings, 0 replies; only message in thread
From: Jeff Mahoney @ 2012-10-11 17:23 UTC (permalink / raw)
  To: reiserfs-devel

This patch fixes the following warning:
unpack.c:536:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
 debugreiserfs/unpack.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/debugreiserfs/unpack.c b/debugreiserfs/unpack.c
index fb93b6b..e71306a 100644
--- a/debugreiserfs/unpack.c
+++ b/debugreiserfs/unpack.c
@@ -532,9 +532,8 @@ void unpack_partition (int fd, int jfd)
 	    continue;
 	}
 
-	fread (c + 1, 1, 1, stdin);
-	magic16 = le16_to_cpu(*(__u16 *)c);
-	/*fread16 (&magic16);*/
+	fread16 (&magic16);
+	magic16 = le16_to_cpu(magic16);
 	
 	switch (magic16 & 0xff) {
 	case LEAF_START_MAGIC:
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-10-11 17:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-11 17:23 [PATCH 05/10] debugreiserfs: fix dereferencing type-punned pointer warning Jeff Mahoney

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.