1From cbd367160338847b28fc801a12c74f1c8b5b03ee Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 7 Mar 2020 08:34:02 -0800
4Subject: [PATCH] nss does not build on mips with clang because wrong types are
5 used?
6
7pqg.c:339:16: error: comparison of constant 18446744073709551615 with expression of type 'unsigned long' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
8     if (addend < MP_DIGIT_MAX) {
9       ~~~~~~ ^ ~~~~~~~~~~~~
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12Upstream-Status: Pending
13
14---
15 nss/lib/freebl/pqg.c | 4 ++--
16 1 file changed, 2 insertions(+), 2 deletions(-)
17
18diff --git a/nss/lib/freebl/pqg.c b/nss/lib/freebl/pqg.c
19index 1b03278..ad895b7 100644
20--- a/nss/lib/freebl/pqg.c
21+++ b/nss/lib/freebl/pqg.c
22@@ -326,8 +326,8 @@ generate_h_candidate(SECItem *hit, mp_int *H)
23
24 static SECStatus
25 addToSeed(const SECItem *seed,
26-          unsigned long addend,
27-          int seedlen, /* g in 186-1 */
28+          unsigned long long  addend,
29+          int                 seedlen, /* g in 186-1 */
30           SECItem *seedout)
31 {
32     mp_int s, sum, modulus, tmp;
33