Messages in this thread | | | Date | Sun, 1 Sep 2013 07:10:08 -0400 | From | Theodore Ts'o <> | Subject | Re: [PATCH v7 1/4] spinlock: A new lockref structure for lockless update of refcount |
| |
Speaking of bool (and I'm not a fan of it either), is this warning just noise (which is bad enough since it masks real warnings), or is this going to cause serious problems?
CHECK /usr/projects/linux/ext4/kernel/trace/trace.c /usr/projects/linux/ext4/kernel/trace/trace.c:559:6: warning: symbol 'free_snapshot' was not declared. Should it be static? /usr/projects/linux/ext4/kernel/trace/trace.c:1489:14: warning: expression using sizeof bool /usr/projects/linux/ext4/kernel/trace/trace.c:1489:14: warning: expression using sizeof bool /usr/projects/linux/ext4/kernel/trace/trace.c:1489:14: warning: expression using sizeof bool /usr/projects/linux/ext4/kernel/trace/trace.c:1489:14: warning: expression using sizeof bool /usr/projects/linux/ext4/kernel/trace/trace.c:1492:9: warning: expression using sizeof bool /usr/projects/linux/ext4/kernel/trace/trace.c:1492:9: warning: expression using sizeof bool /usr/projects/linux/ext4/kernel/trace/trace.c:1492:9: warning: expression using sizeof bool /usr/projects/linux/ext4/kernel/trace/trace.c:1492:9: warning: expression using sizeof bool /usr/projects/linux/ext4/kernel/trace/trace.c:1539:9: warning: expression using sizeof bool /usr/projects/linux/ext4/kernel/trace/trace.c:1539:9: warning: expression using sizeof bool /usr/projects/linux/ext4/kernel/trace/trace.c:1539:9: warning: expression using sizeof bool /usr/projects/linux/ext4/kernel/trace/trace.c:1539:9: warning: expression using sizeof bool
(i.e., is a C compiler allowed to pack multiple bools stored in a data structure into a single byte, with potentially hilarious results for C code trying to do magic utilizing sizeof and offsetof (which some of our kernel macros do use, IIRC)?
- Ted
P.S. BTW, this is not the only set of sparse warnings that are emitted by files in kernel/trace/*; maybe it would be good if the ftrace maintianers worked on nuking them all? There are also a bunch of warnings like which I've only recently learned indicated potential RCU bugs:
/usr/projects/linux/ext4/kernel/trace/trace.c:1885:17: warning: incorrect type in assignment (different address spaces) /usr/projects/linux/ext4/kernel/trace/trace.c:1885:17: expected struct trace_buffer_struct *buffers /usr/projects/linux/ext4/kernel/trace/trace.c:1885:17: got struct trace_buffer_struct [noderef] <asn:3>*<noident>
| |