Suppress modpost warnings treated as errors












1















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?










share|improve this question





























    1















    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?










    share|improve this question



























      1












      1








      1








      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?










      share|improve this question
















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      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
























          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
          });


          }
          });














          draft saved

          draft discarded


















          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
















          draft saved

          draft discarded




















































          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.




          draft saved


          draft discarded














          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





















































          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







          這個網誌中的熱門文章

          Tangent Lines Diagram Along Smooth Curve

          Yusuf al-Mu'taman ibn Hud

          Zucchini