Warnings when building out-of-tree module with -Wsign-compare
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Trusty |
Fix Released
|
Undecided
|
Mauricio Faria de Oliveira | ||
Utopic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Bug originally reported and fixes provided by Brian Hart, IBM.
Various warnings will be seen when building an out-of-tree module with -Wsign-compare if any of the following are included:
include/
include/
include/linux/fb.h
Seen on post-release 14.04, with current kernel headers.
Example...
Makefile:
-------
obj-m := sample.o
EXTRA_CFLAGS = -Wsign-compare
-------
sample.c:
-------
#include <linux/init.h>
#include <linux/module.h>
#include <linux/bitops.h>
#include <linux/cpumask.h>
#include <linux/fb.h>
MODULE_
static int sample_init(void)
{
printk(
return 0;
}
static void sample_term(void)
{
printk(
return;
}
module_
module_
-------
$ ARCH=powerpc make -C /usr/src/
...
include/
..
include/
...
include/
...
Fix:
-----
upstream commits:
- bitops.h: linux c32fa99f0b42526
- cpumask.h: linux-next cea092c9488cbb2
- fb.h: linux-next ee3468739ed83d8
Patches will be sent to the kernel-team mailing list.
Changed in linux (Ubuntu Trusty): | |
status: | New → In Progress |
Changed in linux (Ubuntu Utopic): | |
status: | Confirmed → Fix Released |
Changed in linux (Ubuntu Trusty): | |
assignee: | nobody → Mauricio Faria de Oliveira (mauricfo) |
Changed in linux (Ubuntu Trusty): | |
status: | In Progress → Fix Committed |
Patches submitted to the mailing list. [1]
Marking this as confirmed since I confirmed Brian's report.
[1] https:/ /lists. ubuntu. com/archives/ kernel- team/2014- May/043098. html