Giter VIP home page Giter VIP logo

Comments (2)

imneme avatar imneme commented on July 18, 2024

The sign-compare one is easy to fix (and I've done so). The implicit conversion one probably ought to be fixed by making all implicit conversions explicit. That's a bigger patch than one line, and I'm also not sure that's a good idea overall.

from pcg-c.

mobileben avatar mobileben commented on July 18, 2024

I do also build this using GCC on Ubuntu and took at the compile logs (I mainly build to run and test on the Mac so I tend to not examine the build results as much).

The entropy.c signed warning which you fixed does show up in older build logs. But at least with my build config with GCC, there are no precision loss warnings. Those only show up with clang.

I do see what you mean about this being more than a one line fix. An alternative would be to use a #pragma

This for example

#if __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wconversion"
#endif /* __clang __ */

This obviously needs a pop later on. And this also may be deemed a bit heavy handed.

The other way would be to add casts where necessary. Based on taking a look at the code, the places where I see they need it do look like true downcasts of integers.

In general my code is clean of warnings. So this one unfortunately pops up in several places.

from pcg-c.

Related Issues (10)

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.