From 28a1eadb8eff4476078b6fd3fc425f0f4e5e9e45 Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Fri, 3 Nov 2017 12:47:16 -0400 Subject: Add PRI{u,x}limb for printf formats MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is to fix ``` src/Specific/Framework/bench/fibe.c: In function ‘fe_print’: src/Specific/Framework/bench/fibe.c:130:5: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint32_t’ [-Wformat=] printf("0x%016llx)<< %lu) + ", x[i], limb_weight_gaps[i-1]); ^ src/Specific/Framework/bench/fibe.c:130:5: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint32_t’ [-Wformat=] src/Specific/Framework/bench/fibe.c:132:3: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint32_t’ [-Wformat=] printf("0x%016llx", x[0]); ^ ``` --- generate_parameters.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'generate_parameters.py') diff --git a/generate_parameters.py b/generate_parameters.py index 76b50e0f4..9713f25ea 100644 --- a/generate_parameters.py +++ b/generate_parameters.py @@ -157,6 +157,8 @@ def get_extra_compiler_params(q, base, bitwidth, sz): 'a24_val' : repr(str(a24)), 'a24_hex' : repr(hex(a24)), 'limb_t' : 'uint%d_t' % bitwidth, + 'PRIxlimb' : 'PRIx%d' % bitwidth, + 'PRIulimb' : 'PRIu%d' % bitwidth, 'modulus_limbs' : repr(str(sz)), 'limb_weight_gaps_array' : limb_widths } -- cgit v1.2.3