Skip to content

Commit

Permalink
More Windows issues fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
wbhart committed Nov 23, 2015
1 parent 9b09f9d commit 38c568f
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 13 deletions.
3 changes: 2 additions & 1 deletion d_mat/gso.c
Expand Up @@ -28,7 +28,8 @@
void
d_mat_gso(d_mat_t B, const d_mat_t A)
{
slong i, j, k, flag;
slong i, j, k;
int flag;
double t, s;

if (B->r != A->r || B->c != A->c)
Expand Down
6 changes: 3 additions & 3 deletions d_mat/init.c
Expand Up @@ -29,7 +29,7 @@
void
d_mat_init(d_mat_t mat, slong rows, slong cols)
{
if ((rows) && (cols)) /* Allocate space for r*c small entries */
if (rows != 0 && cols != 0) /* Allocate space for r*c small entries */
{
slong i;
mat->entries = (double *) flint_malloc(rows * cols * sizeof(double));
Expand All @@ -41,8 +41,8 @@ d_mat_init(d_mat_t mat, slong rows, slong cols)
else
{
mat->entries = NULL;
mat->rows = NULL;
}
mat->rows = NULL;
}

mat->r = rows;
mat->c = cols;
Expand Down
3 changes: 2 additions & 1 deletion d_mat/qr.c
Expand Up @@ -28,7 +28,8 @@
void
d_mat_qr(d_mat_t Q, d_mat_t R, const d_mat_t A)
{
slong i, j, k, flag, orig;
slong i, j, k;
int flag, orig;
double t, s;

if (Q->r != A->r || Q->c != A->c || R->r != A->c || R->c != A->c)
Expand Down
2 changes: 1 addition & 1 deletion d_vec/dot_thrice.c
Expand Up @@ -34,7 +34,7 @@ _d_vec_dot_thrice(const double *vec1, const double *vec2, slong len2,
int i, j;
double p, h, a1, a2, b1, b2, c, res = 0, g;
double *r;
ulong factor = (1 << 27) + 1;
ulong factor = (UWORD(1) << 27) + 1;

if (len2 == 0)
{
Expand Down
2 changes: 1 addition & 1 deletion fmpz_lll/babai.c
Expand Up @@ -448,7 +448,7 @@ FUNC_HEAD
}
else /* otherwise X is -1 */
{
fmpz_set_si(x + j, -1);
fmpz_set_si(x + j, -WORD(1));
for (k = zeros + 1; k < j; k++)
{
tmp = ldexp(d_mat_entry(mu, j, k), exponent);
Expand Down
2 changes: 1 addition & 1 deletion fmpz_lll/check_babai_heuristic.c
Expand Up @@ -385,7 +385,7 @@ fmpz_lll_check_babai_heuristic(int kappa, fmpz_mat_t B, fmpz_mat_t U,
}
else /* otherwise X is -1 */
{
fmpz_set_si(x + j, -1);
fmpz_set_si(x + j, -WORD(1));
for (k = zeros + 1; k < j; k++)
{
mpf_add(mpf_mat_entry(mu, kappa, k),
Expand Down
3 changes: 2 additions & 1 deletion mpf_mat/gso.c
Expand Up @@ -28,7 +28,8 @@
void
mpf_mat_gso(mpf_mat_t B, const mpf_mat_t A)
{
slong i, j, k, flag;
slong i, j, k;
int flag;
mpf_t t, s, tmp, eps;
mp_bitcnt_t exp;

Expand Down
4 changes: 2 additions & 2 deletions mpf_mat/init.c
Expand Up @@ -33,7 +33,7 @@ void
mpf_mat_init(mpf_mat_t mat, slong rows, slong cols, mp_bitcnt_t prec)
{

if ((rows) && (cols)) /* Allocate space for r*c small entries */
if (rows != 0 && cols != 0) /* Allocate space for r*c small entries */
{
slong i;
mat->entries = (mpf *) flint_malloc(rows * cols * sizeof(mpf));
Expand All @@ -48,7 +48,7 @@ mpf_mat_init(mpf_mat_t mat, slong rows, slong cols, mp_bitcnt_t prec)
{
mat->entries = NULL;
mat->rows = NULL;
}
}

mat->r = rows;
mat->c = cols;
Expand Down
3 changes: 2 additions & 1 deletion mpf_mat/qr.c
Expand Up @@ -28,7 +28,8 @@
void
mpf_mat_qr(mpf_mat_t Q, mpf_mat_t R, const mpf_mat_t A)
{
slong i, j, k, flag, orig;
slong i, j, k;
int flag, orig;
mpf_t t, s, tmp, eps;
mp_bitcnt_t exp;

Expand Down
2 changes: 1 addition & 1 deletion mpfr_mat/init.c
Expand Up @@ -33,7 +33,7 @@ void
mpfr_mat_init(mpfr_mat_t mat, slong rows, slong cols, mpfr_prec_t prec)
{

if ((rows) && (cols)) /* Allocate space for r*c small entries */
if (rows != 0 && cols != 0) /* Allocate space for r*c small entries */
{
slong i;
mat->entries =
Expand Down

0 comments on commit 38c568f

Please sign in to comment.