Comments (2)
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.
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)
- add extensibility feature for longer periods? HOT 1
- Compile failure on 32-bit Mac OS X HOT 2
- Makefile install need fix HOT 1
- HowTo: interject intermittent entropy? HOT 4
- Possibility of relicensing using BSD 3-clause or similar (GPL compat)
- Undefined behavior: Upper bound of zero HOT 1
- Add support for CMake
- pcg-c fails to build unless 128-bit ops are supported (as e.g. on NetBSD/powerpc) HOT 5
- pcg website's pcg-c download link: use github's automated zipball HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pcg-c.