Skip to content

Commit

Permalink
Merge pull request #140 from JuliaIO/yyc/0.7
Browse files Browse the repository at this point in the history
Fix 0.7 depwarns
  • Loading branch information
timholy authored Jul 12, 2017
2 parents eaa4dc8 + 8c41548 commit c43eacd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/error_handling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Handles a list of thrown errors after no IO library was found working
function handle_exceptions(exceptions::Vector, action)
# first show all errors when there are more then one
multiple = length(exceptions) > 1
println(STDERR, "Error$(multiple?"s" : "") encountered while $action.")
println(STDERR, "Error$(multiple ? "s" : "") encountered while $action.")
if multiple
println("All errors:")
for (err, file) in exceptions
Expand Down
8 changes: 4 additions & 4 deletions src/registry.jl
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ add_format(format"GSLIB", (), [".gslib",".sgems"], [:GslibIO])
### Audio formats
function detectwav(io)
seekstart(io)
magic = read(io, UInt8, 4)
magic = read!(io, Vector{UInt8}(4))
magic == b"RIFF" || return false
seek(io, 8)
submagic = read(io, UInt8, 4)
submagic = read!(io, Vector{UInt8}(4))

submagic == b"WAVE"
end
Expand All @@ -157,10 +157,10 @@ add_format(format"FLAC","fLaC",".flac",[:FLAC])
# AVI is a subtype of RIFF, as is WAV
function detectavi(io)
seekstart(io)
magic = read(io, UInt8, 4)
magic = read!(io, Vector{UInt8}(4))
magic == b"RIFF" || return false
seek(io, 8)
submagic = read(io, UInt8, 4)
submagic = read!(io, Vector{UInt8}(4))

submagic == b"AVI "
end
Expand Down

0 comments on commit c43eacd

Please sign in to comment.