Commit Graph

10 Commits

Author SHA1 Message Date
Don Cross
30a9b0b757 Fixed warnings from gcc 12.2.
I'm taking gcc 12.2 for a test drive today.
It reports a few warnings that slipped through earlier versions.
None of the warnings concern me for actual code safety,
but I went ahead and resolved them to keep the build clean.

Also provide a hook for a CPP environment variable to override
the C++ compiler to use, instead of forcing g++.
2022-12-08 13:41:12 -05:00
Don Cross
5dbd6ea612 Fixed another abs() warning in novas.c.
There was one more place where novas.c calls abs()
that caused a warning when compiled on the Mac.
It was passing long int to abs(). To be abundantly
cautious, instead of using labs(), I just manually
check for negative values and toggle -- inline abs.
2021-12-30 11:05:19 -05:00
Don Cross
51c6f6a591 Fixed warnings in novas.c on Mac builds.
I received a report that there are compiler warnings
that break the build in novas.c when building on the Mac.
In two cases, long integers are passed to abs(), which expects
its argument to be int. The warnings broke the build
of the 'generate' program. I patched the code so these
warnings should no longer occur, though I do not have a
Mac to test. Will ask the correspondent to test for me.
2021-12-29 14:48:25 -05:00
Don Cross
e268637828 Fixed warnings reported by gcc 11.2.0.
The newer gcc generates warnings when a function
is declared to take a sized array parameter, but the caller
passes an array of smaller dimension. In these cases, the
intention was to pass arrays of variable size, so I deleted
the specific array sizes.
2021-10-16 20:30:47 -04:00
Don Cross
e19d50c68c Fixed #72 - resolved build warnings in gcc 9.3.0.
Version 9.3.0 of gcc has extra warnings that detect snprintf
truncations and use of possibly uninitialized variables.
Fixed some warnings of both types.
2020-07-21 23:30:44 +00:00
Don Cross
3f2d8416d8 Fixed #32 - Warning-as-error in Windows build.
Compiler does not understand that there is no need for
a switch default because the enclosing switch statement
has already guarded against that.  Changed to ternary
operator to make compiler warning go away.
2019-04-25 17:01:28 -04:00
Don Cross
18e09d8290 Check all return values of fread() and fseek() to make warnings go away. 2019-04-16 13:03:11 -04:00
Don Cross
907353c2bd Rolled back my change to novas.c, because it didn't eliminate warnings after all. 2019-04-16 12:49:04 -04:00
Don Cross
4a4bed0fe6 Band-aid on NOVAS source code to hush compiler warnings.
The original code really is ignoring fread() return values.
That is not good.
But right now I just want it to build without warnings
so I patched the code to make the warnings go away.
2019-04-16 12:37:27 -04:00
Don Cross
2eab0b7805 Added source for NOVAS C 3.1. 2019-04-08 08:44:06 -04:00