Suppress modpost warnings treated as errors
I'm trying to build linux external module. The module compiles ok with suppressed warnings (i.e. with compiler flags -Wno-pointer-sign
and -Wno-unused-but-set-variable
), but modpost fails (obviously, because there are warnings) with following message:
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)) ####
How to suppress warnings in modpost?
linux makefile kbuild
add a comment |
I'm trying to build linux external module. The module compiles ok with suppressed warnings (i.e. with compiler flags -Wno-pointer-sign
and -Wno-unused-but-set-variable
), but modpost fails (obviously, because there are warnings) with following message:
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)) ####
How to suppress warnings in modpost?
linux makefile kbuild
add a comment |
I'm trying to build linux external module. The module compiles ok with suppressed warnings (i.e. with compiler flags -Wno-pointer-sign
and -Wno-unused-but-set-variable
), but modpost fails (obviously, because there are warnings) with following message:
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)) ####
How to suppress warnings in modpost?
linux makefile kbuild
I'm trying to build linux external module. The module compiles ok with suppressed warnings (i.e. with compiler flags -Wno-pointer-sign
and -Wno-unused-but-set-variable
), but modpost fails (obviously, because there are warnings) with following message:
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)) ####
How to suppress warnings in modpost?
linux makefile kbuild
linux makefile kbuild
edited Nov 16 '18 at 16:02
Mike Kinghan
30.6k764113
30.6k764113
asked Nov 16 '18 at 8:11
Dzmitry SankouskiDzmitry Sankouski
314
314
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53333811%2fsuppress-modpost-warnings-treated-as-errors%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53333811%2fsuppress-modpost-warnings-treated-as-errors%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown