How to suppress all warnings being treated as errors for format-truncationOnly output errors / warnings when...

What's that funny "illo" I keep hearing in Southern Spain?

How to extract *.tgz.part-*?

Moonlight bright enough to see by

Idiom for a situation or event that makes one poor or even poorer?

Did I Traumatize My Puppy?

Digit Date Range

How do I count the number of elements in a list which are between two determined values?

How do I stop myself from always placing a monetary value on my time?

How to balance combat for a duet campaign with non-frontliner classes?

Did Terry Pratchett ever explain the inspiration behind the Luggage?

How should I understand FPGA architecture?

Does any politician honestly want a No Deal Brexit?

Is it safe to pay bills over satellite internet?

If you revoke a certificate authority's certificate, do all of the certificates it issued become invalid as well?

Direct consequences for Trump if he continues hindering impeachment investigation?

How can I communicate feelings to players without impacting their agency?

How can you tell apart the pronounciation at the end between the "meine" and "meiner" in the daily spoken situation?

Why is Trump releasing (or not) his tax returns such a big deal?

Can we not simply connect a battery to a RAM to prevent data loss during power cuts?

What fantasy book has twins (except one's blue) and a cloaked ice bear on the cover?

I am often given, occasionally stolen, rarely sold, and never borrowed

What happens when the Immolation spell is cast on a creature immune to fire damage?

Was "Assassin's Creed" based on the 1907 book "Lord of the World"?

Why is Mars cold?



How to suppress all warnings being treated as errors for format-truncation


Only output errors / warnings when compile kernel?cc1: warnings being treated as errors when compile FreeBSD 8.2 ReleaseWarnings/Errors when running clamav/clamscan, scanning 3TB hard-driveArch: All warnings treated as errors?How do I disable g++ displaying notes for errors?suppress grep directory warnings globally






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{
margin-bottom:0;
}








0

















I am trying to build my source using gcc 8.3.0



root@eqx-sjc-engine2-staging:/usr/local/src# gcc --version
gcc (Debian 8.3.0-2) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

root@eqx-sjc-engine2-staging:/usr/local/src#


I am getting the below error



libs/esl/fs_cli.c:1679:43: error: '%s' directive output may be truncated writing up to 1023 bytes into a region of size 1020 [-Werror=format-truncation=]
snprintf(cmd_str, sizeof(cmd_str), "api %snconsole_execute: truenn", argv_command);
libs/esl/fs_cli.c:1679:3: note: 'snprintf' output between 29 and 1052 bytes into a destination of size 1024
snprintf(cmd_str, sizeof(cmd_str), "api %snconsole_execute: truenn", argv_command);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:2693: fs_cli-fs_cli.o] Error 1
make[2]: Leaving directory '/usr/local/src'
make[1]: *** [Makefile:3395: all-recursive] Error 1
make[1]: Leaving directory '/usr/local/src'
make: *** [Makefile:1576: all] Error 2


I tried running the make like below



make -Wno-error=format-truncation


Still I see the same issue.



my linux version is



root@eqx-sjc-engine2-staging:~# cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux buster/sid"
NAME="Debian GNU/Linux"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"


How to fix it?










share|improve this question























  • 3





    Depending on the makefile, you probably need something like make CFLAGS="-Wno-error=format-truncation"

    – muru
    Mar 29 at 9:19











  • I do not want to edit the make file, is there a way to do it only via the command line argument. Like the one I tried above make -Wno-error=format-truncation

    – Karthik
    Mar 29 at 9:49






  • 1





    @Karthik, muru gave you the command line: make CFLAGS="-Wno-error=format-truncation".

    – Stephen Kitt
    Mar 29 at 10:16











  • my bad. got it. thanks guys

    – Karthik
    Mar 29 at 12:07








  • 1





    @muru, your comment sounds like the answer here; would you mind providing it as such? Thank you!

    – Jeff Schaller
    Mar 29 at 14:42


















0

















I am trying to build my source using gcc 8.3.0



root@eqx-sjc-engine2-staging:/usr/local/src# gcc --version
gcc (Debian 8.3.0-2) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

root@eqx-sjc-engine2-staging:/usr/local/src#


I am getting the below error



libs/esl/fs_cli.c:1679:43: error: '%s' directive output may be truncated writing up to 1023 bytes into a region of size 1020 [-Werror=format-truncation=]
snprintf(cmd_str, sizeof(cmd_str), "api %snconsole_execute: truenn", argv_command);
libs/esl/fs_cli.c:1679:3: note: 'snprintf' output between 29 and 1052 bytes into a destination of size 1024
snprintf(cmd_str, sizeof(cmd_str), "api %snconsole_execute: truenn", argv_command);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:2693: fs_cli-fs_cli.o] Error 1
make[2]: Leaving directory '/usr/local/src'
make[1]: *** [Makefile:3395: all-recursive] Error 1
make[1]: Leaving directory '/usr/local/src'
make: *** [Makefile:1576: all] Error 2


I tried running the make like below



make -Wno-error=format-truncation


Still I see the same issue.



my linux version is



root@eqx-sjc-engine2-staging:~# cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux buster/sid"
NAME="Debian GNU/Linux"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"


How to fix it?










share|improve this question























  • 3





    Depending on the makefile, you probably need something like make CFLAGS="-Wno-error=format-truncation"

    – muru
    Mar 29 at 9:19











  • I do not want to edit the make file, is there a way to do it only via the command line argument. Like the one I tried above make -Wno-error=format-truncation

    – Karthik
    Mar 29 at 9:49






  • 1





    @Karthik, muru gave you the command line: make CFLAGS="-Wno-error=format-truncation".

    – Stephen Kitt
    Mar 29 at 10:16











  • my bad. got it. thanks guys

    – Karthik
    Mar 29 at 12:07








  • 1





    @muru, your comment sounds like the answer here; would you mind providing it as such? Thank you!

    – Jeff Schaller
    Mar 29 at 14:42














0












0








0








I am trying to build my source using gcc 8.3.0



root@eqx-sjc-engine2-staging:/usr/local/src# gcc --version
gcc (Debian 8.3.0-2) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

root@eqx-sjc-engine2-staging:/usr/local/src#


I am getting the below error



libs/esl/fs_cli.c:1679:43: error: '%s' directive output may be truncated writing up to 1023 bytes into a region of size 1020 [-Werror=format-truncation=]
snprintf(cmd_str, sizeof(cmd_str), "api %snconsole_execute: truenn", argv_command);
libs/esl/fs_cli.c:1679:3: note: 'snprintf' output between 29 and 1052 bytes into a destination of size 1024
snprintf(cmd_str, sizeof(cmd_str), "api %snconsole_execute: truenn", argv_command);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:2693: fs_cli-fs_cli.o] Error 1
make[2]: Leaving directory '/usr/local/src'
make[1]: *** [Makefile:3395: all-recursive] Error 1
make[1]: Leaving directory '/usr/local/src'
make: *** [Makefile:1576: all] Error 2


I tried running the make like below



make -Wno-error=format-truncation


Still I see the same issue.



my linux version is



root@eqx-sjc-engine2-staging:~# cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux buster/sid"
NAME="Debian GNU/Linux"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"


How to fix it?










share|improve this question















I am trying to build my source using gcc 8.3.0



root@eqx-sjc-engine2-staging:/usr/local/src# gcc --version
gcc (Debian 8.3.0-2) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

root@eqx-sjc-engine2-staging:/usr/local/src#


I am getting the below error



libs/esl/fs_cli.c:1679:43: error: '%s' directive output may be truncated writing up to 1023 bytes into a region of size 1020 [-Werror=format-truncation=]
snprintf(cmd_str, sizeof(cmd_str), "api %snconsole_execute: truenn", argv_command);
libs/esl/fs_cli.c:1679:3: note: 'snprintf' output between 29 and 1052 bytes into a destination of size 1024
snprintf(cmd_str, sizeof(cmd_str), "api %snconsole_execute: truenn", argv_command);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:2693: fs_cli-fs_cli.o] Error 1
make[2]: Leaving directory '/usr/local/src'
make[1]: *** [Makefile:3395: all-recursive] Error 1
make[1]: Leaving directory '/usr/local/src'
make: *** [Makefile:1576: all] Error 2


I tried running the make like below



make -Wno-error=format-truncation


Still I see the same issue.



my linux version is



root@eqx-sjc-engine2-staging:~# cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux buster/sid"
NAME="Debian GNU/Linux"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"


How to fix it?







linux make gcc






share|improve this question














share|improve this question











share|improve this question




share|improve this question










asked Mar 29 at 8:13









KarthikKarthik

445 bronze badges




445 bronze badges











  • 3





    Depending on the makefile, you probably need something like make CFLAGS="-Wno-error=format-truncation"

    – muru
    Mar 29 at 9:19











  • I do not want to edit the make file, is there a way to do it only via the command line argument. Like the one I tried above make -Wno-error=format-truncation

    – Karthik
    Mar 29 at 9:49






  • 1





    @Karthik, muru gave you the command line: make CFLAGS="-Wno-error=format-truncation".

    – Stephen Kitt
    Mar 29 at 10:16











  • my bad. got it. thanks guys

    – Karthik
    Mar 29 at 12:07








  • 1





    @muru, your comment sounds like the answer here; would you mind providing it as such? Thank you!

    – Jeff Schaller
    Mar 29 at 14:42














  • 3





    Depending on the makefile, you probably need something like make CFLAGS="-Wno-error=format-truncation"

    – muru
    Mar 29 at 9:19











  • I do not want to edit the make file, is there a way to do it only via the command line argument. Like the one I tried above make -Wno-error=format-truncation

    – Karthik
    Mar 29 at 9:49






  • 1





    @Karthik, muru gave you the command line: make CFLAGS="-Wno-error=format-truncation".

    – Stephen Kitt
    Mar 29 at 10:16











  • my bad. got it. thanks guys

    – Karthik
    Mar 29 at 12:07








  • 1





    @muru, your comment sounds like the answer here; would you mind providing it as such? Thank you!

    – Jeff Schaller
    Mar 29 at 14:42








3




3





Depending on the makefile, you probably need something like make CFLAGS="-Wno-error=format-truncation"

– muru
Mar 29 at 9:19





Depending on the makefile, you probably need something like make CFLAGS="-Wno-error=format-truncation"

– muru
Mar 29 at 9:19













I do not want to edit the make file, is there a way to do it only via the command line argument. Like the one I tried above make -Wno-error=format-truncation

– Karthik
Mar 29 at 9:49





I do not want to edit the make file, is there a way to do it only via the command line argument. Like the one I tried above make -Wno-error=format-truncation

– Karthik
Mar 29 at 9:49




1




1





@Karthik, muru gave you the command line: make CFLAGS="-Wno-error=format-truncation".

– Stephen Kitt
Mar 29 at 10:16





@Karthik, muru gave you the command line: make CFLAGS="-Wno-error=format-truncation".

– Stephen Kitt
Mar 29 at 10:16













my bad. got it. thanks guys

– Karthik
Mar 29 at 12:07







my bad. got it. thanks guys

– Karthik
Mar 29 at 12:07






1




1





@muru, your comment sounds like the answer here; would you mind providing it as such? Thank you!

– Jeff Schaller
Mar 29 at 14:42





@muru, your comment sounds like the answer here; would you mind providing it as such? Thank you!

– Jeff Schaller
Mar 29 at 14:42










2 Answers
2






active

oldest

votes


















2


















Depending on the makefile, you probably need something like:



make CFLAGS="-Wno-error=format-truncation"


The default Makefile rules, and most well-written Makefiles, should see CFLAGS for option arguments to the C compiler being used. Similarly, you can use CXXFLAGS for providing options to the C++ compiler, and LDFLAGS for the linker.






share|improve this answer


































    0


















    ./configure --enable-fatal-warnings=no






    share|improve this answer



























    • This would turn off more warnings than necessary.

      – Kusalananda
      16 secs ago













    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    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: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    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/4.0/"u003ecc by-sa 4.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%2funix.stackexchange.com%2fquestions%2f509384%2fhow-to-suppress-all-warnings-being-treated-as-errors-for-format-truncation%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown


























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2


















    Depending on the makefile, you probably need something like:



    make CFLAGS="-Wno-error=format-truncation"


    The default Makefile rules, and most well-written Makefiles, should see CFLAGS for option arguments to the C compiler being used. Similarly, you can use CXXFLAGS for providing options to the C++ compiler, and LDFLAGS for the linker.






    share|improve this answer































      2


















      Depending on the makefile, you probably need something like:



      make CFLAGS="-Wno-error=format-truncation"


      The default Makefile rules, and most well-written Makefiles, should see CFLAGS for option arguments to the C compiler being used. Similarly, you can use CXXFLAGS for providing options to the C++ compiler, and LDFLAGS for the linker.






      share|improve this answer





























        2














        2










        2









        Depending on the makefile, you probably need something like:



        make CFLAGS="-Wno-error=format-truncation"


        The default Makefile rules, and most well-written Makefiles, should see CFLAGS for option arguments to the C compiler being used. Similarly, you can use CXXFLAGS for providing options to the C++ compiler, and LDFLAGS for the linker.






        share|improve this answer














        Depending on the makefile, you probably need something like:



        make CFLAGS="-Wno-error=format-truncation"


        The default Makefile rules, and most well-written Makefiles, should see CFLAGS for option arguments to the C compiler being used. Similarly, you can use CXXFLAGS for providing options to the C++ compiler, and LDFLAGS for the linker.







        share|improve this answer













        share|improve this answer




        share|improve this answer










        answered Mar 29 at 16:05









        murumuru

        45.4k5 gold badges111 silver badges185 bronze badges




        45.4k5 gold badges111 silver badges185 bronze badges




























            0


















            ./configure --enable-fatal-warnings=no






            share|improve this answer



























            • This would turn off more warnings than necessary.

              – Kusalananda
              16 secs ago
















            0


















            ./configure --enable-fatal-warnings=no






            share|improve this answer



























            • This would turn off more warnings than necessary.

              – Kusalananda
              16 secs ago














            0














            0










            0









            ./configure --enable-fatal-warnings=no






            share|improve this answer














            ./configure --enable-fatal-warnings=no







            share|improve this answer













            share|improve this answer




            share|improve this answer










            answered 57 mins ago









            Stephen XiaStephen Xia

            1




            1
















            • This would turn off more warnings than necessary.

              – Kusalananda
              16 secs ago



















            • This would turn off more warnings than necessary.

              – Kusalananda
              16 secs ago

















            This would turn off more warnings than necessary.

            – Kusalananda
            16 secs ago





            This would turn off more warnings than necessary.

            – Kusalananda
            16 secs ago



















            draft saved

            draft discarded



















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • 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%2funix.stackexchange.com%2fquestions%2f509384%2fhow-to-suppress-all-warnings-being-treated-as-errors-for-format-truncation%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









            Popular posts from this blog

            Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

            Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

            Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...