Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 Nov 2006 14:28:35 +0200
From:      Ian FREISLICH <if@hetzner.co.za>
To:        Ruslan Ermilov <ru@freebsd.org>
Cc:        freebsd-current@freebsd.org, Steve Kargl <sgk@troutmask.apl.washington.edu>
Subject:   Re: gjournal.c type punning problem 
Message-ID:  <E1GfFCu-0001Ok-8Z@hetzner.co.za>
In-Reply-To: Message from Ruslan Ermilov <ru@freebsd.org> of "Wed, 01 Nov 2006 13:58:02 %2B0300." <20061101105802.GE1785@rambler-co.ru> 

next in thread | previous in thread | raw e-mail | index | archive | help
Ruslan Ermilov wrote:
> 
> --hxkXGo8AKqTJ+9QI
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> Content-Transfer-Encoding: quoted-printable
> 
> On Tue, Oct 31, 2006 at 03:35:14PM -0800, Steve Kargl wrote:
> > cc -O2 -pipe -march=3Dopteron -I/usr/src/sbin/fsck_ffs -DRESCUE -Wsystem-=
> headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -c /usr/src/sbin/f=
> sck_ffs/gjournal.c
> > /usr/src/sbin/fsck_ffs/gjournal.c: In function `gjournal_check':
> > /usr/src/sbin/fsck_ffs/gjournal.c:717: warning: dereferencing type-punned=
>  pointer will break strict-aliasing rules
> > *** Error code 1
> >=20
> Should be fixed.

Related...

Index: /usr/src/sys/modules/geom/geom_journal/../../../geom/journal/g_journal.c
===================================================================
RCS file: /home/ncvs/src/sys/geom/journal/g_journal.c,v
retrieving revision 1.3
diff -u -d -r1.3 g_journal.c
--- /usr/src/sys/modules/geom/geom_journal/../../../geom/journal/g_journal.c   1 Nov 2006 09:37:11 -0000        1.3
+++ /usr/src/sys/modules/geom/geom_journal/../../../geom/journal/g_journal.c   1 Nov 2006 12:19:12 -0000
@@ -1000,7 +1000,6 @@
                }
                GJ_DEBUG(3, "INSERT(%p): DONE %d", *head, n);
        }
-       sbuf_delete(sb);
        return (n);
 }

But, I'm working blind.  It fixes this:

/usr/src/sys/modules/geom/geom_journal/../../../geom/journal/g_journal.c: In function `g_journal_insert':
/usr/src/sys/modules/geom/geom_journal/../../../geom/journal/g_journal.c:1003: error: `sb' undeclared (first use in this function)
/usr/src/sys/modules/geom/geom_journal/../../../geom/journal/g_journal.c:1003: error: (Each undeclared identifier is reported only once
/usr/src/sys/modules/geom/geom_journal/../../../geom/journal/g_journal.c:1003: error: for each function it appears in.)
*** Error code 1

But I have no idea what it breaks.

Ian

--
Ian Freislich



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1GfFCu-0001Ok-8Z>