Skip to content

Commit

Permalink
Fix some JET issues
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Nov 5, 2023
1 parent cced335 commit 99ffeaf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/GrpAb/GrpAbFinGen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,7 @@ function _sub_integer_snf(G::GrpAbFinGen, n::ZZRingElem, add_to_lattice::Bool =
ind += 1
end
if ind == ngens(G) && gcd(n, G.snf[ind]) == G.snf[ind]
Gnew = GrpAbFinGenElem(Int[])
Gnew = GrpAbFinGen(Int[])

Check warning on line 1149 in src/GrpAb/GrpAbFinGen.jl

View check run for this annotation

Codecov / codecov/patch

src/GrpAb/GrpAbFinGen.jl#L1149

Added line #L1149 was not covered by tests
mp = hom(Gnew, G, GrpAbFinGenElem[])
if add_to_lattice
append!(L, mp)
Expand Down
6 changes: 3 additions & 3 deletions src/Misc/Integer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ function ecm(a::ZZRingElem, B1::Int, B2::Int, ncrv::Int, rnd=flint_rand_ctx)
end

#data from http://www.mersennewiki.org/index.php/Elliptic_Curve_Method
B1 = [2, 11, 50, 250, 1000, 3000, 11000, 43000, 110000, 260000, 850000, 2900000];
nC = [25, 90, 300, 700, 1800, 5100, 10600, 19300, 49000, 124000, 210000, 340000];
const B1 = [2, 11, 50, 250, 1000, 3000, 11000, 43000, 110000, 260000, 850000, 2900000];
const nC = [25, 90, 300, 700, 1800, 5100, 10600, 19300, 49000, 124000, 210000, 340000];

function ecm(a::ZZRingElem, max_digits::Int=div(ndigits(a), 3), rnd=flint_rand_ctx)
n = ndigits(a, 10)
Expand Down Expand Up @@ -532,7 +532,7 @@ function Base.iterate(D::Divisors{T}, i) where {T}
if x === nothing
return x
end
return D.f(x[1]), x[2]
return D.f(x[1])::T, x[2]
end

function Base.show(io::IO, D::Divisors)
Expand Down
3 changes: 2 additions & 1 deletion src/QuadForm/Quad/NormalForm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -836,9 +836,10 @@ function _min_nonsquare(p)
Rx, x = polynomial_ring(GF(p, cached = false), "x", cached = false)
for i in 1:p
if length(factor(x^2 - i)) == 1
return i
return Int(i)
end
end
error("this can't be reached")

Check warning on line 842 in src/QuadForm/Quad/NormalForm.jl

View check run for this annotation

Codecov / codecov/patch

src/QuadForm/Quad/NormalForm.jl#L842

Added line #L842 was not covered by tests
end

function _issquare(d::Nemo.ZZModRingElem, p::ZZRingElem)
Expand Down

0 comments on commit 99ffeaf

Please sign in to comment.