a099073 Enable warnings. (Gregory Maxwell)
861f9a5 field_gmp's negate doesn't need to use the magnitude argument. (Gregory Maxwell)
f0709ac Avoid forward static decl of undefined functions, also fix a paren warning in the tests. (Gregory Maxwell)
3276e7d Signed/unsigned comparisons in tests. (Gregory Maxwell)
850562e Avoid unsigned comparison in scalar arith. (Gregory Maxwell)
65a14ab Fix varrious signed/unsigned comparisons. (Gregory Maxwell)
e9e0e21 Avoid a shadowed variable. (Gregory Maxwell)
e28a8b8 Remove a VERIFY_CHECK for >=0ness on an unsigned type. (Gregory Maxwell)
2cad067 Correct function prototypes and avoid unused parameter warnings. (Gregory Maxwell)
a4a43d7 Reorder static to comply with C99 and switch to the inline macro. (Gregory Maxwell)
Wno-unused-function is used for the moment because of the checking
functions which are currently only used by VERIFY but are not (yet?)
ifdefed out in normal builds.
GCC (and clang) supports extensions to annotate functions so that their
results must be used and so that their arguments can't be statically
provable to be null. If a caller violates these requirements they
get a warning, so this helps them write correct code.
I deployed this in libopus a couple years ago with good success, and
the implementation here is basically copied straight from that.
One consideration is that the non-null annotation teaches the optimizer
and will actually compile out runtime non-nullness checks as dead-code.
Since this is usually not whats wanted, the non-null annotations are
disabled when compiling the library itself.
The commit also removes some dead inclusions of assert.h and introduces
compatibility macros for restrict and inline in preparation for some
portability improvements.
This fixes a cosmetic precedence bug in the tests along with some
type warnings.
It also adds a dummy cast to the CHECK macro to avoid hundreds
of statement with no effect warnings on compilers that warn about
such things.
- caused by 8881212ebc
- OSX's ar tool doesn't work for empty archives ("ar: no archive members specified")
- introduce COMMON_LIB variable; leave empty when not using asm
Magnitude m means values are allowed to be up to 2 * 0xFFF...FFF * m,
while the argument passed to secp256k1_fe_negate didn't take the 2 into
account. Fix this.