From: Neil Brown <neilb@suse.de>
To: reiserfs-dev@namesys.com, linux-kernel@vger.kernel.org
Subject: Re: Bug in fs/reiserfs/file.c
Date: Tue, 28 Feb 2006 14:55:50 +1100 [thread overview]
Message-ID: <17411.51654.9256.327930@cse.unsw.edu.au> (raw)
In-Reply-To: message from Neil Brown on Tuesday February 28
On Tuesday February 28, neilb@suse.de wrote:
>
>
> As an aside,
> info gcc
> tells me that '-W' will cause a warning when
>
> * An unsigned value is compared against zero with `<' or `<='.
>
> It doesn't :-(
Actually, it does. However Linux isn't compiled with "-W".
I'm experimenting with
diff ./Makefile~current~ ./Makefile
--- ./Makefile~current~ 2006-02-28 14:44:21.000000000 +1100
+++ ./Makefile 2006-02-28 14:44:51.000000000 +1100
@@ -306,7 +306,7 @@ LINUXINCLUDE := -Iinclude \
CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE)
-CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
+CFLAGS := -W -Wall -Wno-unused -Wno-sign-compare -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common \
-ffreestanding
AFLAGS := -D__ASSEMBLY__
and it reports the following.
I think all of these are harmless except the file.c:1472 one (I
think), but it probably wouldn't hurt to tidy them up.
NeilBrown
GEN /home/src/mm-i386/Makefile
scripts/kconfig/conf -s arch/i386/Kconfig
#
# using defaults found in .config
#
SPLIT include/linux/autoconf.h -> include/config/*
Using /home/src/mm as source for kernel
GEN /home/src/mm-i386/Makefile
CHK include/linux/version.h
CC fs/reiserfs/bitmap.o
CC fs/reiserfs/do_balan.o
CC fs/reiserfs/namei.o
/home/src/mm/fs/reiserfs/namei.c: In function `reiserfs_lookup':
/home/src/mm/fs/reiserfs/namei.c:370: warning: empty body in an if-statement
/home/src/mm/fs/reiserfs/namei.c: In function `reiserfs_create':
/home/src/mm/fs/reiserfs/namei.c:629: warning: empty body in an if-statement
/home/src/mm/fs/reiserfs/namei.c:673: warning: empty body in an if-statement
/home/src/mm/fs/reiserfs/namei.c: In function `reiserfs_mknod':
/home/src/mm/fs/reiserfs/namei.c:704: warning: empty body in an if-statement
/home/src/mm/fs/reiserfs/namei.c:752: warning: empty body in an if-statement
/home/src/mm/fs/reiserfs/namei.c: In function `reiserfs_mkdir':
/home/src/mm/fs/reiserfs/namei.c:783: warning: empty body in an if-statement
/home/src/mm/fs/reiserfs/namei.c:838: warning: empty body in an if-statement
CC fs/reiserfs/inode.o
/home/src/mm/fs/reiserfs/inode.c: In function `reiserfs_get_block':
/home/src/mm/fs/reiserfs/inode.c:630: warning: comparison of unsigned expression < 0 is always false
/home/src/mm/fs/reiserfs/inode.c:942: warning: comparison of unsigned expression < 0 is always false
CC fs/reiserfs/file.o
/home/src/mm/fs/reiserfs/file.c: In function `reiserfs_file_write':
/home/src/mm/fs/reiserfs/file.c:1472: warning: comparison of unsigned expression < 0 is always false
CC fs/reiserfs/dir.o
CC fs/reiserfs/fix_node.o
/home/src/mm/fs/reiserfs/fix_node.c: In function `create_virtual_node':
/home/src/mm/fs/reiserfs/fix_node.c:196: warning: empty body in an else-statement
CC fs/reiserfs/super.o
/home/src/mm/fs/reiserfs/super.c:687: warning: missing initializer
/home/src/mm/fs/reiserfs/super.c:687: warning: (near initialization for `logging_mode[3].clrmask')
/home/src/mm/fs/reiserfs/super.c:694: warning: missing initializer
/home/src/mm/fs/reiserfs/super.c:694: warning: (near initialization for `barrier_mode[2].clrmask')
/home/src/mm/fs/reiserfs/super.c: In function `reiserfs_parse_options':
/home/src/mm/fs/reiserfs/super.c:892: warning: missing initializer
/home/src/mm/fs/reiserfs/super.c:892: warning: (near initialization for `opts[9].arg_required')
/home/src/mm/fs/reiserfs/super.c:910: warning: missing initializer
/home/src/mm/fs/reiserfs/super.c:910: warning: (near initialization for `opts[25].arg_required')
CC fs/reiserfs/prints.o
CC fs/reiserfs/objectid.o
CC fs/reiserfs/lbalance.o
CC fs/reiserfs/ibalance.o
CC fs/reiserfs/stree.o
CC fs/reiserfs/hashes.o
CC fs/reiserfs/tail_conversion.o
CC fs/reiserfs/journal.o
/home/src/mm/fs/reiserfs/journal.c: In function `journal_read':
/home/src/mm/fs/reiserfs/journal.c:2322: warning: comparison of unsigned expression >= 0 is always true
CC fs/reiserfs/resize.o
CC fs/reiserfs/item_ops.o
CC fs/reiserfs/ioctl.o
CC fs/reiserfs/procfs.o
LD fs/reiserfs/reiserfs.o
LD fs/reiserfs/built-in.o
next prev parent reply other threads:[~2006-02-28 3:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-28 1:29 Neil Brown
2006-02-28 3:55 ` Neil Brown [this message]
2006-02-28 18:53 ` Hans Reiser
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=17411.51654.9256.327930@cse.unsw.edu.au \
--to=neilb@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=reiserfs-dev@namesys.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®