Git Product home page Git Product logo

Comments (7)

robertswiecki avatar robertswiecki commented on May 2, 2024

Please try with 21a7bbb

from nsjail.

ArchangeGabriel avatar ArchangeGabriel commented on May 2, 2024

No, if you want to fix it that way, you should just pass -Wno-format-truncation instead. Which works, while your change does not. ;)

from nsjail.

ArchangeGabriel avatar ArchangeGabriel commented on May 2, 2024

(I’m building with sed -i 's/-Wno-format-nonliteral/-Wno-format-nonliteral -Wno-format-truncation/' Makefile, but reported the issue so that it could be fixed properly)

from nsjail.

robertswiecki avatar robertswiecki commented on May 2, 2024

-Wno-format-truncation is unrecognized with earlier g++/clang++, so cannot add it directly.

I guess I'll rewrite the cgroups.cc at some point, though the current snprintf() use is correct, and the warning is too greedy

from nsjail.

ArchangeGabriel avatar ArchangeGabriel commented on May 2, 2024

Didn’t thought about that. Well if you think that GCC is wrong in outputing such warnings (I admit having insufficient knowledge to tell about that), maybe you should report it to them. They have also been issues with unused variables specified as such triggering the -Wunused-variables for instance in GCC8.

from nsjail.

happyCoder92 avatar happyCoder92 commented on May 2, 2024

The warning also for me seems a little to greedy, but I refactored the code to use std::string.
I was able to compile it cleanly with GCC 8, but would be nice if u could verify it too and let me know.

from nsjail.

ArchangeGabriel avatar ArchangeGabriel commented on May 2, 2024

Works for me too. ;)

from nsjail.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.