Skip to content

Commit

Permalink
Fix warnings in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
albinahlback committed Jan 17, 2024
1 parent 398ee21 commit f1e3e6d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions examples/crt.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

int main(int argc, char* argv[])
{
slong i, bit_bound;
slong bit_bound;
mp_limb_t prime, res;
fmpz_t x, y, prod;

Expand All @@ -43,7 +43,7 @@ int main(int argc, char* argv[])
fmpz_one(prod);

prime = 0;
for (i = 0; fmpz_bits(prod) < bit_bound; i++)
while(fmpz_bits(prod) < bit_bound)
{
prime = n_nextprime(prime, 0);
res = fmpz_fdiv_ui(x, prime);
Expand Down
2 changes: 1 addition & 1 deletion examples/dft.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ benchmark_DFT(slong N, int input, int verbose, slong qqbar_limit, slong gb, ca_c
ca_clear(t, ctx);
}

void usage()
void usage(void)
{
printf("usage: dft [-verbose] [-input i] [-limit B] [-timing T] [-nogb] N\n");
}
Expand Down
2 changes: 1 addition & 1 deletion examples/fpwrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "arb_fpwrap.h"

int main()
int main(void)
{
double x, y;
complex_double cx, cy;
Expand Down
2 changes: 1 addition & 1 deletion examples/functions_benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ slong limit[] = {
1e7,
};

int main()
int main(void)
{
arb_t x, y, res;
slong n, prec;
Expand Down
2 changes: 0 additions & 2 deletions examples/huge_expr.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#include "ca.h"
#include "gr.h"

#pragma GCC optimize("O1")

int gr_sqrt_ui(gr_ptr x, ulong y, gr_ctx_t ctx)
{
int status = gr_set_ui(x, y, ctx);
Expand Down
2 changes: 1 addition & 1 deletion examples/zeta_zeros.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ void print_zeros(arb_srcptr p, const fmpz_t n, slong len, slong digits)
fmpz_clear(k);
}

void print_help()
void print_help(void)
{
flint_printf("zeta_zeros [-n n] [-count n] [-prec n] [-digits n] [-threads n] "
"[-platt] [-noplatt] [-v] [-verbose] [-h] [-help]\n\n");
Expand Down

0 comments on commit f1e3e6d

Please sign in to comment.