Merge pull request #3 from linusdm/int32_specifier_warning
Avoid compile-time warnings
This commit is contained in:
commit
841444b325
|
|
@ -49,20 +49,20 @@ defmodule ISN do
|
||||||
def encode(_opts) do
|
def encode(_opts) do
|
||||||
quote do
|
quote do
|
||||||
thing ->
|
thing ->
|
||||||
[<<IO.iodata_length(thing)::int32>> | thing]
|
[<<IO.iodata_length(thing)::int32()>> | thing]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def decode(:copy) do
|
def decode(:copy) do
|
||||||
quote do
|
quote do
|
||||||
<<len::int32, thing::binary-size(len)>> ->
|
<<len::int32(), thing::binary-size(len)>> ->
|
||||||
:binary.copy(thing)
|
:binary.copy(thing)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def decode(:reference) do
|
def decode(:reference) do
|
||||||
quote do
|
quote do
|
||||||
<<len::int32, thing::binary-size(len)>> ->
|
<<len::int32(), thing::binary-size(len)>> ->
|
||||||
thing
|
thing
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue