Re: gjournal.c type punning problem

From: Ian FREISLICH <if_at_hetzner.co.za>
Date: Wed, 01 Nov 2006 14:28:35 +0200
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
_at__at_ -1000,7 +1000,6 _at__at_
                }
                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
Received on Wed Nov 01 2006 - 11:28:55 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:02 UTC