On Thu, Jun 05, 2014 at 10:59:37AM +0200, Christian Hesse wrote:
> David Sterba on Wed, 2014/06/04 18:44:
> > On Wed, Jun 04, 2014 at 09:19:26AM +0200, Christian Hesse wrote:
> > > > It seems to be related to default gcc flags from distribution?
> > >
> > > Probably. I did compile with optimizati
David Sterba on Wed, 2014/06/04 18:44:
> On Wed, Jun 04, 2014 at 09:19:26AM +0200, Christian Hesse wrote:
> > > It seems to be related to default gcc flags from distribution?
> >
> > Probably. I did compile with optimization, so adding -O2 may do the trick:
> >
> > make CFLAGS="${CFLAGS} -O2" al
gcc 4.9.0 gives warnings about possibly uninitialized values when
compiling with function inlining and optimization level two enabled
(CFLAGS="-finline-functions -O2").
Initializing the values fixes the warning. Hope this is correct.
Signed-off-by: Christian Hesse
---
cmds-send.c | 2 +-
send
On Wed, Jun 04, 2014 at 09:19:26AM +0200, Christian Hesse wrote:
> > It seems to be related to default gcc flags from distribution?
>
> Probably. I did compile with optimization, so adding -O2 may do the trick:
>
> make CFLAGS="${CFLAGS} -O2" all
The warning appears with -O2, so the question is
Qu Wenruo on Wed, 2014/06/04 14:48:
>
> Original Message
> Subject: [PATCH 1/1] btrfs-progs: fix compiler warning
> From: Christian Hesse
> To: linux-btrfs@vger.kernel.org
> Date: 2014年06月03日 19:29
> > gcc 4.9.0 gives a warning: array subscri
Original Message
Subject: [PATCH 1/1] btrfs-progs: fix compiler warning
From: Christian Hesse
To: linux-btrfs@vger.kernel.org
Date: 2014年06月03日 19:29
gcc 4.9.0 gives a warning: array subscript is above array bounds
Checking for "greater or equal" instead of j
David Sterba on Tue, 2014/06/03 18:52:
> On Tue, Jun 03, 2014 at 01:29:19PM +0200, Christian Hesse wrote:
> > gcc 4.9.0 gives a warning: array subscript is above array bounds
> >
> > Checking for "greater or equal" instead of just "equal" fixes this.
>
> That fixes the warning, but I don't see t
On Tue, Jun 03, 2014 at 01:29:19PM +0200, Christian Hesse wrote:
> gcc 4.9.0 gives a warning: array subscript is above array bounds
>
> Checking for "greater or equal" instead of just "equal" fixes this.
That fixes the warning, but I don't see the code path that leads to
level >= BTRFS_MAX_LEVEL
gcc 4.9.0 gives a warning: format ‘%d’ expects argument of type ‘int’,
but argument 2 has type ‘u64’
Using %llu and casting to unsigned long long (same as bytenr) fixes this.
Signed-off-by: Christian Hesse
---
btrfs-select-super.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff
gcc 4.9.0 gives a warning: array subscript is above array bounds
Checking for "greater or equal" instead of just "equal" fixes this.
Signed-off-by: Christian Hesse
---
cmds-restore.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmds-restore.c b/cmds-restore.c
index 96b97e
10 matches
Mail list logo