Skip to content

Commit

Permalink
Resolve JET warnings / errors (#1755)
Browse files Browse the repository at this point in the history
* Resolve JET warnings / errors

* Rename `sz` -> `sc`
  • Loading branch information
fingolfin authored May 17, 2024
1 parent d619886 commit ad054d6
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/HeckeMiscInteger.jl
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ Base.:(:)(a::ZZRingElem, b::ZZRingElem) = ZZRingElemUnitRange(a, b)

@inline function getindex(r::ZZRingElemUnitRange, i::ZZRingElem)
val = r.start + (i - 1)
@boundscheck _in_unit_range(r, val) || throw_boundserror(r, i)
@boundscheck _in_unit_range(r, val) || Base.throw_boundserror(r, i)
val
end
_in_unit_range(r::ZZRingElemUnitRange, val::ZZRingElem) = r.start <= val <= r.stop
Expand Down
2 changes: 1 addition & 1 deletion src/HeckeMoreStuff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ function *(a::ZZMatrix, b::Matrix{BigFloat})
ncols(a) == s[1] || error("dimensions do not match")

c = Array{BigFloat}(undef, nrows(a), s[2])
return mult!(c, a, b)
return mul!(c, a, b)
end

function Base.setprecision(x::BigFloat, p::Int)
Expand Down
6 changes: 3 additions & 3 deletions src/Nemo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -403,11 +403,11 @@ function versioninfo()

print("Nemo: ")
prepo = Base.LibGit2.GitRepo(nemorepo)
Base.LibGit2.with(LibGit2.head(prepo)) do phead
Base.LibGit2.with(Base.LibGit2.head(prepo)) do phead
print("commit: ")
print(string(LibGit2.Oid(phead))[1:8])
print(string(Base.LibGit2.Oid(phead))[1:8])
print(" date: ")
commit = Base.LibGit2.get(Base.LibGit2.GitCommit, prepo, LibGit2.Oid(phead))
commit = Base.LibGit2.get(Base.LibGit2.GitCommit, prepo, Base.LibGit2.Oid(phead))
print(Base.Dates.unix2datetime(Base.LibGit2.author(commit).time))
print(")\n")
end
Expand Down
4 changes: 2 additions & 2 deletions src/flint/fmpz_laurent_series.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1121,14 +1121,14 @@ function add!(c::ZZLaurentSeriesRingElem, a::ZZLaurentSeriesRingElem, b::ZZLaure
elseif lenb == 1
sb = sa
end
sz = gcd(gcd(sa, sb), abs(vala - valb))
sc = gcd(gcd(sa, sb), abs(vala - valb))
mina = min(vala + lena*sa, prec)
minb = min(valb + lenb*sb, prec)
lenr = max(mina, minb) - valr
R = base_ring(c)
c = set_precision!(c, prec)
c = set_valuation!(c, valr)
c = set_scale!(c, sz)
c = set_scale!(c, sc)
pa = vala
pb = valb
j = 0
Expand Down
2 changes: 1 addition & 1 deletion src/flint/nmod_mat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ end

function AbstractAlgebra._solve_triu(x::T, y::T) where T <: Zmodn_mat
(base_ring(x) != base_ring(y)) && error("Matrices must have same base ring")
is_upper_trangular(x) || error("Matrix must be upper triangular")
is_upper_triangular(x) || error("Matrix must be upper triangular")
z = similar(x, nrows(x), ncols(y))
_solve_triu!(z, x, y, 0)
return z
Expand Down
6 changes: 3 additions & 3 deletions src/flint/nmod_poly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ end
###############################################################################

function reverse(x::T, len::Int) where T <: Zmodn_poly
len < 0 && throw(DomainError(n, "Index must be non-negative"))
len < 0 && throw(DomainError(len, "Index must be non-negative"))
z = parent(x)()
ccall((:nmod_poly_reverse, libflint), Nothing,
(Ref{T}, Ref{T}, Int), z, x, len)
Expand Down Expand Up @@ -877,9 +877,9 @@ function det(M::Generic.Mat{zzModPolyRingElem})
end

try
return det_fflu(M)
return AbstractAlgebra.det_fflu(M)
catch
return det_df(M)
return AbstractAlgebra.det_df(M)
end
end

Expand Down

0 comments on commit ad054d6

Please sign in to comment.