[Gmp-commit] /var/hg/gmp: Add 'static' and 'const' for the benefit of C++.
mercurial at gmplib.org
mercurial at gmplib.org
Sat Nov 15 21:31:12 UTC 2014
details: /var/hg/gmp/rev/0f3ee27fb06b
changeset: 16519:0f3ee27fb06b
user: Torbjorn Granlund <torbjorng at google.com>
date: Sat Nov 15 20:46:48 2014 +0100
description:
Add 'static' and 'const' for the benefit of C++.
diffstat:
ChangeLog | 10 ++++++++++
tests/mpn/logic.c | 2 +-
tests/mpz/reuse.c | 12 ++++++------
tests/mpz/t-perfpow.c | 2 +-
tune/tuneup.c | 2 --
5 files changed, 18 insertions(+), 10 deletions(-)
diffs (117 lines):
diff -r 19797812a209 -r 0f3ee27fb06b ChangeLog
--- a/ChangeLog Sat Nov 15 15:06:24 2014 +0100
+++ b/ChangeLog Sat Nov 15 20:46:48 2014 +0100
@@ -1,3 +1,13 @@
+2014-11-15 Torbjörn Granlund <torbjorng at google.com>
+
+ * tests/mpz/reuse.c: Make function vectors 'static'.
+
+ * tests/mpn/logic.c (check_one): Make string variable 'const'.
+
+ * tests/mpz/t-perfpow.c (tests): Make 'static'.
+
+ * tune/tuneup.c (fftmes): Remove an unused variable.
+
2014-11-15 Marc Glisse <marc.glisse at inria.fr>
* tests/amd64check.c (calling_conventions_fenv): Mark as extern "C".
diff -r 19797812a209 -r 0f3ee27fb06b tests/mpn/logic.c
--- a/tests/mpn/logic.c Sat Nov 15 15:06:24 2014 +0100
+++ b/tests/mpn/logic.c Sat Nov 15 20:46:48 2014 +0100
@@ -41,7 +41,7 @@
void
-check_one (mp_srcptr refp, mp_srcptr rp, mp_srcptr ap, mp_srcptr bp, mp_size_t n, char *funcname)
+check_one (mp_srcptr refp, mp_srcptr rp, mp_srcptr ap, mp_srcptr bp, mp_size_t n, const char *funcname)
{
if (mpn_cmp (refp, rp, n))
{
diff -r 19797812a209 -r 0f3ee27fb06b tests/mpz/reuse.c
--- a/tests/mpz/reuse.c Sat Nov 15 15:06:24 2014 +0100
+++ b/tests/mpz/reuse.c Sat Nov 15 20:46:48 2014 +0100
@@ -73,7 +73,7 @@
const char *fname;
int isdivision;
int isslow;
-} dss[] =
+} static dss[] =
{ { mpz_add, "mpz_add", 0, 0 },
{ mpz_sub, "mpz_sub", 0, 0 },
{ mpz_mul, "mpz_mul", 0, 0 },
@@ -97,7 +97,7 @@
dsi_func fptr;
const char *fname;
int mod;
-} dsi[] =
+} static dsi[] =
{
/* Don't change order here without changing the code in main(). */
{ mpz_add_ui, "mpz_add_ui", 0 },
@@ -116,7 +116,7 @@
struct {
dsi_div_func fptr;
const char *fname;
-} dsi_div[] =
+} static dsi_div[] =
{
{ mpz_cdiv_q_ui, "mpz_cdiv_q_ui" },
{ mpz_cdiv_r_ui, "mpz_cdiv_r_ui" },
@@ -130,7 +130,7 @@
ddsi_div_func fptr;
const char *fname;
int isslow;
-} ddsi_div[] =
+} static ddsi_div[] =
{
{ mpz_cdiv_qr_ui, "mpz_cdiv_qr_ui", 0 },
{ mpz_fdiv_qr_ui, "mpz_fdiv_qr_ui", 0 },
@@ -142,7 +142,7 @@
ddss_div_func fptr;
const char *fname;
int isslow;
-} ddss_div[] =
+} static ddss_div[] =
{
{ mpz_cdiv_qr, "mpz_cdiv_qr", 0 },
{ mpz_fdiv_qr, "mpz_fdiv_qr", 0 },
@@ -153,7 +153,7 @@
ds_func fptr;
const char *fname;
int nonneg;
-} ds[] =
+} static ds[] =
{
{ mpz_abs, "mpz_abs", 0 },
{ mpz_com, "mpz_com", 0 },
diff -r 19797812a209 -r 0f3ee27fb06b tests/mpz/t-perfpow.c
--- a/tests/mpz/t-perfpow.c Sat Nov 15 15:06:24 2014 +0100
+++ b/tests/mpz/t-perfpow.c Sat Nov 15 20:46:48 2014 +0100
@@ -30,7 +30,7 @@
{
const char *num_as_str;
char want;
-} tests[] =
+} static tests[] =
{
{ "0", 1},
{ "1", 1},
diff -r 19797812a209 -r 0f3ee27fb06b tune/tuneup.c
--- a/tune/tuneup.c Sat Nov 15 15:06:24 2014 +0100
+++ b/tune/tuneup.c Sat Nov 15 20:46:48 2014 +0100
@@ -881,7 +881,6 @@
int n_measurements;
mp_limb_t *ap, *bp, *rp;
mp_size_t alloc;
- char *linepref;
struct fft_table_nk *fft_tab;
fft_tab = mpn_fft_table3[p->sqr];
@@ -905,7 +904,6 @@
{
printf ("\\\n { ");
printf ("{%7u,%2u}", fft_tab[0].n, fft_tab[0].k);
- linepref = " ";
}
idx = 1;
More information about the gmp-commit
mailing list