Skip to content

Commit

Permalink
get rid of warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Rychlewski authored and Greg Rychlewski committed Jul 2, 2024
1 parent 049fbd8 commit 4bf1b9b
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions lib/postgrex/type_module.ex
Original file line number Diff line number Diff line change
Expand Up @@ -658,16 +658,18 @@ defmodule Postgrex.TypeModule do
unquote(rows)
)
when unquote(guard) do
_ = var!(mod)
unquote(acc) = [unquote(body) | acc]

case types do
unquote(dispatch)
end
end

defp unquote(extension)(<<unquote(pattern), rest::binary>>, var!(mod) = mod, acc)
defp unquote(extension)(<<unquote(pattern), rest::binary>>, var!(mod), acc)
when unquote(guard) do
unquote(extension)(rest, mod, [unquote(body) | acc])
_ = var!(mod)
unquote(extension)(rest, var!(mod), [unquote(body) | acc])
end

defp unquote(extension)(
Expand All @@ -677,6 +679,7 @@ defmodule Postgrex.TypeModule do
callback
)
when unquote(guard) do
_ = var!(mod)
unquote(extension)(rest, mod, [unquote(body) | acc], callback)
end

Expand All @@ -689,6 +692,7 @@ defmodule Postgrex.TypeModule do
acc
)
when unquote(guard) do
_ = var!(mod)
decode_tuple(rest, oids, types, n, [{n, unquote(body)} | acc])
end
end
Expand All @@ -705,6 +709,7 @@ defmodule Postgrex.TypeModule do
unquote(full),
unquote(rows)
) do
_ = var!(mod)
unquote(acc) = [unquote(body) | acc]

case types do
Expand All @@ -713,6 +718,7 @@ defmodule Postgrex.TypeModule do
end

defp unquote(extension)(<<unquote(pattern), rest::binary>>, var!(mod), acc) do
_ = var!(mod)
decoded = unquote(body)
unquote(extension)(rest, var!(mod), [decoded | acc])
end
Expand All @@ -723,6 +729,7 @@ defmodule Postgrex.TypeModule do
acc,
callback
) do
_ = var!(mod)
decoded = unquote(body)
unquote(extension)(rest, var!(mod), [decoded | acc], callback)
end
Expand All @@ -735,6 +742,7 @@ defmodule Postgrex.TypeModule do
n,
acc
) do
_ = var!(mod)
decode_tuple(rest, oids, types, n, [{n, unquote(body)} | acc])
end
end
Expand Down Expand Up @@ -852,6 +860,7 @@ defmodule Postgrex.TypeModule do
unquote(rows)
)
when unquote(guard) do
_ = var!(mod)
unquote(acc) = [unquote(body) | acc]

case types do
Expand All @@ -867,6 +876,7 @@ defmodule Postgrex.TypeModule do
acc
)
when unquote(guard) do
_ = var!(mod)
acc = [unquote(body) | acc]
unquote(extension)(rest, unquote(sub_oids), unquote(sub_types), var!(mod), acc)
end
Expand All @@ -882,6 +892,7 @@ defmodule Postgrex.TypeModule do
acc
)
when unquote(guard) do
_ = var!(mod)
decode_tuple(rest, oids, types, n, [{n, unquote(body)} | acc])
end
end
Expand Down Expand Up @@ -912,6 +923,7 @@ defmodule Postgrex.TypeModule do
unquote(full),
unquote(rows)
) do
_ = var!(mod)
unquote(acc) = [unquote(body) | acc]

case types do
Expand All @@ -926,6 +938,7 @@ defmodule Postgrex.TypeModule do
var!(mod),
acc
) do
_ = var!(mod)
acc = [unquote(body) | acc]
unquote(extension)(rest, unquote(sub_oids), unquote(sub_types), var!(mod), acc)
end
Expand All @@ -940,6 +953,7 @@ defmodule Postgrex.TypeModule do
n,
acc
) do
_ = var!(mod)
acc = [{n, unquote(body)} | acc]
decode_tuple(rest, oids, types, n, acc)
end
Expand Down

0 comments on commit 4bf1b9b

Please sign in to comment.