diff --git a/examples/crt.c b/examples/crt.c index e9082703fc..f9af8abef0 100644 --- a/examples/crt.c +++ b/examples/crt.c @@ -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; @@ -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); diff --git a/examples/dft.c b/examples/dft.c index f8f9bf5398..eb373cae93 100644 --- a/examples/dft.c +++ b/examples/dft.c @@ -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"); } diff --git a/examples/fpwrap.c b/examples/fpwrap.c index 79f4951392..71fb51f585 100644 --- a/examples/fpwrap.c +++ b/examples/fpwrap.c @@ -2,7 +2,7 @@ #include "arb_fpwrap.h" -int main() +int main(void) { double x, y; complex_double cx, cy; diff --git a/examples/functions_benchmark.c b/examples/functions_benchmark.c index 3143d40e63..5aca68c9b4 100644 --- a/examples/functions_benchmark.c +++ b/examples/functions_benchmark.c @@ -92,7 +92,7 @@ slong limit[] = { 1e7, }; -int main() +int main(void) { arb_t x, y, res; slong n, prec; diff --git a/examples/huge_expr.c b/examples/huge_expr.c index a732178299..8c2f99497d 100644 --- a/examples/huge_expr.c +++ b/examples/huge_expr.c @@ -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); diff --git a/examples/zeta_zeros.c b/examples/zeta_zeros.c index ebdfa6dd44..0968eb243e 100644 --- a/examples/zeta_zeros.c +++ b/examples/zeta_zeros.c @@ -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");