From a6c6f994b55619154fda3de20527dc560b8ca1ed Mon Sep 17 00:00:00 2001 From: Andrew Poelstra Date: Sun, 5 Jun 2016 21:39:17 +0000 Subject: [PATCH 1/2] Remove a bunch of unused stdlib #includes --- src/field_10x26_impl.h | 2 -- src/field_5x52_impl.h | 1 - src/group_impl.h | 2 -- src/scalar_impl.h | 2 -- 4 files changed, 7 deletions(-) diff --git a/src/field_10x26_impl.h b/src/field_10x26_impl.h index a8188b4a..7b8c0796 100644 --- a/src/field_10x26_impl.h +++ b/src/field_10x26_impl.h @@ -7,8 +7,6 @@ #ifndef _SECP256K1_FIELD_REPR_IMPL_H_ #define _SECP256K1_FIELD_REPR_IMPL_H_ -#include -#include #include "util.h" #include "num.h" #include "field.h" diff --git a/src/field_5x52_impl.h b/src/field_5x52_impl.h index b31e24ab..7a99eb21 100644 --- a/src/field_5x52_impl.h +++ b/src/field_5x52_impl.h @@ -11,7 +11,6 @@ #include "libsecp256k1-config.h" #endif -#include #include "util.h" #include "num.h" #include "field.h" diff --git a/src/group_impl.h b/src/group_impl.h index f9036854..8357b4b1 100644 --- a/src/group_impl.h +++ b/src/group_impl.h @@ -7,8 +7,6 @@ #ifndef _SECP256K1_GROUP_IMPL_H_ #define _SECP256K1_GROUP_IMPL_H_ -#include - #include "num.h" #include "field.h" #include "group.h" diff --git a/src/scalar_impl.h b/src/scalar_impl.h index 88ea97de..c5baf4df 100644 --- a/src/scalar_impl.h +++ b/src/scalar_impl.h @@ -7,8 +7,6 @@ #ifndef _SECP256K1_SCALAR_IMPL_H_ #define _SECP256K1_SCALAR_IMPL_H_ -#include - #include "group.h" #include "scalar.h" From ac01378c87905773ee44df9dfa97d600b7586552 Mon Sep 17 00:00:00 2001 From: Andrew Poelstra Date: Mon, 6 Jun 2016 18:32:29 +0000 Subject: [PATCH 2/2] build: add -DSECP256K1_BUILD to benchmark_internal build flags gcc 6 will warn about our non-null checks when SECP256K1_BUILD our NONNULL marker is nontrivial. This occurs unless SECP256K1_BUILD is set, which we had forgotten to do for the internal benchmarks, which compile directly against the library instead of linking. --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 6054461e..3d130bdc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -84,7 +84,7 @@ bench_sign_SOURCES = src/bench_sign.c bench_sign_LDADD = libsecp256k1.la $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB) bench_internal_SOURCES = src/bench_internal.c bench_internal_LDADD = $(SECP_LIBS) $(COMMON_LIB) -bench_internal_CPPFLAGS = $(SECP_INCLUDES) +bench_internal_CPPFLAGS = -DSECP256K1_BUILD $(SECP_INCLUDES) endif if USE_TESTS