Skip to content

Commit c43eacd

Browse files
authored
Merge pull request #140 from JuliaIO/yyc/0.7
Fix 0.7 depwarns
2 parents eaa4dc8 + 8c41548 commit c43eacd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/error_handling.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Handles a list of thrown errors after no IO library was found working
6060
function handle_exceptions(exceptions::Vector, action)
6161
# first show all errors when there are more then one
6262
multiple = length(exceptions) > 1
63-
println(STDERR, "Error$(multiple?"s" : "") encountered while $action.")
63+
println(STDERR, "Error$(multiple ? "s" : "") encountered while $action.")
6464
if multiple
6565
println("All errors:")
6666
for (err, file) in exceptions

src/registry.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,10 @@ add_format(format"GSLIB", (), [".gslib",".sgems"], [:GslibIO])
141141
### Audio formats
142142
function detectwav(io)
143143
seekstart(io)
144-
magic = read(io, UInt8, 4)
144+
magic = read!(io, Vector{UInt8}(4))
145145
magic == b"RIFF" || return false
146146
seek(io, 8)
147-
submagic = read(io, UInt8, 4)
147+
submagic = read!(io, Vector{UInt8}(4))
148148

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

165165
submagic == b"AVI "
166166
end

0 commit comments

Comments
 (0)