Skip to content

Commit

Permalink
Fix compile-time warnings instead of suppressing them. (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
IslandUsurper authored Mar 15, 2022
1 parent 4a10b45 commit c2d946d
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 18 deletions.
3 changes: 0 additions & 3 deletions lib/scrub.ex
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
defmodule Scrub do
import Scrub.BinaryUtils, warn: false
def vendor, do: "ex"
def serial_number, do: "pTLC"

alias Scrub.CIP.ConnectionManager
alias Scrub.Session

require IEx

def open_session(host) do
Scrub.Session.start_link(host)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/scrub/cip/connection_manager.ex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
defmodule Scrub.CIP.ConnectionManager do
import Scrub.BinaryUtils, warn: false
import Scrub.BinaryUtils

alias Scrub.CIP
alias Scrub.CIP.Type
Expand Down
2 changes: 1 addition & 1 deletion lib/scrub/cip/symbol.ex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
defmodule Scrub.CIP.Symbol do
import Scrub.BinaryUtils, warn: false
import Scrub.BinaryUtils

alias Scrub.CIP

Expand Down
3 changes: 2 additions & 1 deletion lib/scrub/cip/template.ex
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
defmodule Scrub.CIP.Template do
import Scrub.BinaryUtils, warn: false
import Scrub.BinaryUtils

alias Scrub.CIP
alias Scrub.CIP.Symbol

Expand Down
2 changes: 1 addition & 1 deletion lib/scrub/cip/type.ex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
defmodule Scrub.CIP.Type do
import Scrub.BinaryUtils, warn: false
import Scrub.BinaryUtils

alias Scrub.CIP.Symbol

Expand Down
5 changes: 0 additions & 5 deletions lib/scrub/session.ex
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,6 @@ defmodule Scrub.Session do
:ok
end

@impl true
def checkin(state) do
{:ok, state}
end

@impl true
def checkout(state) do
{:ok, state}
Expand Down
2 changes: 1 addition & 1 deletion lib/scrub/session/cpf.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Scrub.Session.CPF do
2-6 Common Packet Format
"""

import Scrub.BinaryUtils, warn: false
import Scrub.BinaryUtils

# 2-6.3 Item ID Numbers
@item_ids [
Expand Down
2 changes: 1 addition & 1 deletion lib/scrub/session/protocol.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Scrub.Session.Protocol do
EtherNet/IP Protocol
"""

import Scrub.BinaryUtils, warn: false
import Scrub.BinaryUtils

alias Scrub.Session.CPF
alias Scrub.CIP.Connection
Expand Down
4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ defmodule Scrub.MixProject do
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
extra_applications: [:logger, :crypto]
]
end

# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:db_connection, "~> 2.2"},
{:db_connection, "~> 2.4"},
{:ex_doc, "~> 0.18", only: [:dev, :test], runtime: false}
]
end
Expand Down
5 changes: 3 additions & 2 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
%{
"connection": {:hex, :connection, "1.0.4", "a1cae72211f0eef17705aaededacac3eb30e6625b04a6117c1b2db6ace7d5976", [:mix], [], "hexpm", "4a0850c9be22a43af9920a71ab17c051f5f7d45c209e40269a1938832510e4d9"},
"db_connection": {:hex, :db_connection, "2.2.1", "caee17725495f5129cb7faebde001dc4406796f12a62b8949f4ac69315080566", [:mix], [{:connection, "~> 1.0.2", [hex: :connection, repo: "hexpm", optional: false]}], "hexpm", "2b02ece62d9f983fcd40954e443b7d9e6589664380e5546b2b9b523cd0fb59e1"},
"connection": {:hex, :connection, "1.1.0", "ff2a49c4b75b6fb3e674bfc5536451607270aac754ffd1bdfe175abe4a6d7a68", [:mix], [], "hexpm", "722c1eb0a418fbe91ba7bd59a47e28008a189d47e37e0e7bb85585a016b2869c"},
"db_connection": {:hex, :db_connection, "2.4.1", "6411f6e23f1a8b68a82fa3a36366d4881f21f47fc79a9efb8c615e62050219da", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ea36d226ec5999781a9a8ad64e5d8c4454ecedc7a4d643e4832bf08efca01f00"},
"earmark": {:hex, :earmark, "1.4.4", "4821b8d05cda507189d51f2caeef370cf1e18ca5d7dfb7d31e9cafe6688106a4", [:mix], [], "hexpm", "1f93aba7340574847c0f609da787f0d79efcab51b044bb6e242cae5aca9d264d"},
"ex_doc": {:hex, :ex_doc, "0.21.3", "857ec876b35a587c5d9148a2512e952e24c24345552259464b98bfbb883c7b42", [:mix], [{:earmark, "~> 1.4", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm", "0db1ee8d1547ab4877c5b5dffc6604ef9454e189928d5ba8967d4a58a801f161"},
"makeup": {:hex, :makeup, "1.0.1", "82f332e461dc6c79dbd82fbe2a9c10d48ed07146f0a478286e590c83c52010b5", [:mix], [{:nimble_parsec, "~> 0.5.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "49736fe5b66a08d8575bf5321d716bac5da20c8e6b97714fec2bcd6febcfa1f8"},
"makeup_elixir": {:hex, :makeup_elixir, "0.14.0", "cf8b7c66ad1cff4c14679698d532f0b5d45a3968ffbcbfd590339cb57742f1ae", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "d4b316c7222a85bbaa2fd7c6e90e37e953257ad196dc229505137c5e505e9eff"},
"nimble_parsec": {:hex, :nimble_parsec, "0.5.3", "def21c10a9ed70ce22754fdeea0810dafd53c2db3219a0cd54cf5526377af1c6", [:mix], [], "hexpm", "589b5af56f4afca65217a1f3eb3fee7e79b09c40c742fddc1c312b3ac0b3399f"},
"telemetry": {:hex, :telemetry, "1.0.0", "0f453a102cdf13d506b7c0ab158324c337c41f1cc7548f0bc0e130bbf0ae9452", [:rebar3], [], "hexpm", "73bc09fa59b4a0284efb4624335583c528e07ec9ae76aca96ea0673850aec57a"},
}

0 comments on commit c2d946d

Please sign in to comment.