summaryrefslogtreecommitdiff
path: root/meta-openembedded/meta-oe/recipes-support/nss/nss/pqg.c-ULL_addend.patch
blob: 5505ae36ac02fac7598e0c07e35eb2a43584aad9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From a550bdf458f11dff46ebddbac94cf48c27d3471e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 7 Mar 2020 08:34:02 -0800
Subject: [PATCH] nss does not build on mips with clang because wrong types are
 used?

pqg.c:339:16: error: comparison of constant 18446744073709551615 with expression of type 'unsigned long' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
     if (addend < MP_DIGIT_MAX) {
       ~~~~~~ ^ ~~~~~~~~~~~~

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending

---
 nss/lib/freebl/pqg.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/nss/lib/freebl/pqg.c b/nss/lib/freebl/pqg.c
index 626b2fb..052ad36 100644
--- a/nss/lib/freebl/pqg.c
+++ b/nss/lib/freebl/pqg.c
@@ -326,8 +326,8 @@ generate_h_candidate(SECItem *hit, mp_int *H)
 
 static SECStatus
 addToSeed(const SECItem *seed,
-          unsigned long addend,
-          int seedlen, /* g in 186-1 */
+          unsigned long long  addend,
+          int                 seedlen, /* g in 186-1 */
           SECItem *seedout)
 {
     mp_int s, sum, modulus, tmp;