summaryrefslogtreecommitdiff
path: root/src/ext
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-06-11 10:15:40 -0400
committerNick Mathewson <nickm@torproject.org>2016-06-11 10:15:40 -0400
commitd6b2af7a3aba24cf3d77587c41028aad70d59605 (patch)
treea6d8687d4055a9e27fbcb406cfb518295469bf0c /src/ext
parentc274f825da18f33f12eb78260d1c78d5f685d959 (diff)
parente80a032b61e3c793ad0d1627074b8750f7cfec48 (diff)
downloadtor-d6b2af7a3aba24cf3d77587c41028aad70d59605.tar.gz
tor-d6b2af7a3aba24cf3d77587c41028aad70d59605.zip
Merge branch 'bug19180_easy_squashed'
Diffstat (limited to 'src/ext')
-rw-r--r--src/ext/ed25519/donna/curve25519-donna-64bit.h4
-rw-r--r--src/ext/ed25519/donna/ed25519-donna-64bit-x86.h9
-rw-r--r--src/ext/ed25519/donna/ed25519-donna-batchverify.h2
-rw-r--r--src/ext/ht.h2
-rw-r--r--src/ext/tinytest.c9
5 files changed, 19 insertions, 7 deletions
diff --git a/src/ext/ed25519/donna/curve25519-donna-64bit.h b/src/ext/ed25519/donna/curve25519-donna-64bit.h
index 2941d1bcdc..50c9916768 100644
--- a/src/ext/ed25519/donna/curve25519-donna-64bit.h
+++ b/src/ext/ed25519/donna/curve25519-donna-64bit.h
@@ -8,9 +8,9 @@
typedef uint64_t bignum25519[5];
-static const uint64_t reduce_mask_40 = ((uint64_t)1 << 40) - 1;
+//static const uint64_t reduce_mask_40 = ((uint64_t)1 << 40) - 1;
static const uint64_t reduce_mask_51 = ((uint64_t)1 << 51) - 1;
-static const uint64_t reduce_mask_56 = ((uint64_t)1 << 56) - 1;
+//static const uint64_t reduce_mask_56 = ((uint64_t)1 << 56) - 1;
/* out = in */
DONNA_INLINE static void
diff --git a/src/ext/ed25519/donna/ed25519-donna-64bit-x86.h b/src/ext/ed25519/donna/ed25519-donna-64bit-x86.h
index 30bd472762..f6b5570298 100644
--- a/src/ext/ed25519/donna/ed25519-donna-64bit-x86.h
+++ b/src/ext/ed25519/donna/ed25519-donna-64bit-x86.h
@@ -2,6 +2,11 @@
#define HAVE_GE25519_SCALARMULT_BASE_CHOOSE_NIELS
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Woverlength-strings"
+#endif
+
DONNA_NOINLINE static void
ge25519_scalarmult_base_choose_niels(ge25519_niels *t, const uint8_t table[256][96], uint32_t pos, signed char b) {
int64_t breg = (int64_t)b;
@@ -347,5 +352,9 @@ ge25519_scalarmult_base_choose_niels(ge25519_niels *t, const uint8_t table[256][
);
}
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
#endif /* defined(ED25519_GCC_64BIT_X86_CHOOSE) */
diff --git a/src/ext/ed25519/donna/ed25519-donna-batchverify.h b/src/ext/ed25519/donna/ed25519-donna-batchverify.h
index 43c4923b3e..7c64cce787 100644
--- a/src/ext/ed25519/donna/ed25519-donna-batchverify.h
+++ b/src/ext/ed25519/donna/ed25519-donna-batchverify.h
@@ -188,7 +188,7 @@ ge25519_multi_scalarmult_vartime(ge25519 *r, batch_heap *heap, size_t count) {
}
/* not actually used for anything other than testing */
-unsigned char batch_point_buffer[3][32];
+static unsigned char batch_point_buffer[3][32];
static int
ge25519_is_neutral_vartime(const ge25519 *p) {
diff --git a/src/ext/ht.h b/src/ext/ht.h
index 28d1fe49d5..1b6cbe6632 100644
--- a/src/ext/ht.h
+++ b/src/ext/ht.h
@@ -203,6 +203,7 @@ ht_string_hash(const char *s)
name##_HT_GROW(head, head->hth_n_entries+1); \
HT_SET_HASH_(elm, field, hashfn); \
p = name##_HT_FIND_P_(head, elm); \
+ HT_ASSERT_(p != NULL); /* this holds because we called HT_GROW */ \
r = *p; \
*p = elm; \
if (r && (r!=elm)) { \
@@ -470,6 +471,7 @@ ht_string_hash(const char *s)
name##_HT_GROW(var##_head_, var##_head_->hth_n_entries+1); \
HT_SET_HASH_((elm), field, hashfn); \
var = name##_HT_FIND_P_(var##_head_, (elm)); \
+ HT_ASSERT_(var); /* Holds because we called HT_GROW */ \
if (*var) { \
y; \
} else { \
diff --git a/src/ext/tinytest.c b/src/ext/tinytest.c
index f6baeeb9a5..3fb1b39c71 100644
--- a/src/ext/tinytest.c
+++ b/src/ext/tinytest.c
@@ -69,15 +69,16 @@ static int n_skipped = 0; /**< Number of tests that have been skipped. */
static int opt_forked = 0; /**< True iff we're called from inside a win32 fork*/
static int opt_nofork = 0; /**< Suppress calls to fork() for debugging. */
static int opt_verbosity = 1; /**< -==quiet,0==terse,1==normal,2==verbose */
-const char *verbosity_flag = "";
+static const char *verbosity_flag = "";
-const struct testlist_alias_t *cfg_aliases=NULL;
+static const struct testlist_alias_t *cfg_aliases=NULL;
enum outcome { SKIP=2, OK=1, FAIL=0 };
static enum outcome cur_test_outcome = 0;
-const char *cur_test_prefix = NULL; /**< prefix of the current test group */
+/** prefix of the current test group */
+static const char *cur_test_prefix = NULL;
/** Name of the current test, if we haven't logged is yet. Used for --quiet */
-const char *cur_test_name = NULL;
+static const char *cur_test_name = NULL;
#ifdef _WIN32
/* Copy of argv[0] for win32. */