Comments (2)
Hi @ravbin - I don't see this, but I will bet you it's because we have different versions of gcc/g++. Some versions spot potential overflows that others don't; some issue spurious warnings (which this one is) where others don't.
In this case, I think if you insert the line
assert( ival >= 0L && ival < 1000000000L);
right before the snprintf()
call in question, the error will go away. The reality is that ival
will be within the above range, and therefore the snprintf()
will not actually overflow the buffer. Later versions of g++ are bright enough to figure this out on their own (which I find really impressive) in most cases, but even then, I sometimes have to add a line such as the above.
With the assert
in place, the compiler will think "well, ival
will be within the specified range by the time we get to the snprintf()
, and won't have enough digits to overflow." And all will compile.
Please let me know if that works. (I'm about 99% sure it will, but there's always that 1%.) If it does, I'll modify the code appropriately and push the change to this library.
You also should be able to build as a non-root user.
from jpl_eph.
Yes it solved the problem! Thank you so much.
from jpl_eph.
Related Issues (9)
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 jpl_eph.