Подавлять предупреждения модпоста как ошибки - PullRequest
0 голосов
/ 16 ноября 2018

Я пытаюсь собрать внешний модуль linux.Модуль компилируется нормально с подавленными предупреждениями (то есть с флагами компилятора -Wno-pointer-sign и -Wno-unused-but-set-variable), но происходит сбой modpost (очевидно, потому что есть предупреждения) со следующим сообщением:

Building modules, stage 2.
  MODPOST 1 modules
  CC      ../../../vendor/qcom/opensource/wlan/qcacld-2.0/wlan.mod.o
In file included from /lineage/kernel/samsung/universal7880/include/linux/kobject.h:21:0,
                 from /lineage/kernel/samsung/universal7880/include/linux/module.h:16,
                 from ../../../vendor/qcom/opensource/wlan/qcacld-2.0/wlan.mod.c:1:
/lineage/kernel/samsung/universal7880/include/linux/sysfs.h: In function 'sysfs_get_dirent':
/lineage/kernel/samsung/universal7880/include/linux/sysfs.h:457:37: error: pointer targets in passing argument 2 of 'kernfs_find_and_get' differ in signedness [-Werror=pointer-sign]
  return kernfs_find_and_get(parent, name);
                                     ^
In file included from /lineage/kernel/samsung/universal7880/include/linux/sysfs.h:15:0,
                 from /lineage/kernel/samsung/universal7880/include/linux/kobject.h:21,
                 from /lineage/kernel/samsung/universal7880/include/linux/module.h:16,
                 from ../../../vendor/qcom/opensource/wlan/qcacld-2.0/wlan.mod.c:1:
/lineage/kernel/samsung/universal7880/include/linux/kernfs.h:411:1: note: expected 'const char *' but argument is of type 'const unsigned char *'
 kernfs_find_and_get(struct kernfs_node *kn, const char *name)
 ^
cc1: all warnings being treated as errors
/lineage/kernel/samsung/universal7880/scripts/Makefile.modpost:113: recipe for target '../../../vendor/qcom/opensource/wlan/qcacld-2.0/wlan.mod.o' failed
make[2]: *** [../../../vendor/qcom/opensource/wlan/qcacld-2.0/wlan.mod.o] Error 1
/lineage/kernel/samsung/universal7880/Makefile:1437: recipe for target 'modules' failed
make[1]: *** [modules] Error 2
make[1]: Leaving directory '/lineage/out/target/product/a5y17lte/obj/KERNEL_OBJ'
Makefile:145: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
make: Leaving directory '/lineage/kernel/samsung/universal7880'

#### make failed to build some targets (02:46 (mm:ss)) ####

Как подавить предупреждения вmodpost

...