Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
OverSwift committed Jun 21, 2017
1 parent 78a4704 commit db544e7
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Example/OBD2-Swift/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ViewController: UIViewController {

observer.observe(command: .pid(number: 12)) { (descriptor) in
let respStr = descriptor?.shortDescription
print("Observer : \(respStr)")
print("Observer : \(String(describing: respStr))")
}

ObserverQueue.shared.register(observer: observer)
Expand Down
4 changes: 2 additions & 2 deletions OBD2-Swift.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Pod::Spec.new do |s|
s.name = 'OBD2-Swift'
s.version = '0.1.0'
s.summary = 'OBD or On-board diagnostics is a vehicle's self-diagnostic and reporting capability.'
s.summary = 'Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long '

# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
Expand All @@ -18,7 +18,7 @@ Pod::Spec.new do |s|
# * Finally, don't worry about the indent, CocoaPods strips it!

s.description = <<-DESC
OBD or On-board diagnostics is a vehicle's self-diagnostic and reporting capability. OBD systems give access to the status of the various vehicle subsystems. Simply saying, OBD-II is a sort of computer which monitors emissions, mileage, speed, and other useful data.
Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long .
DESC

s.homepage = 'https://github.com/lemberg/obd2-swift-lib'
Expand Down
1 change: 1 addition & 0 deletions OBD2-Swift/Classes/Scanner/Scanner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class `Scanner`: StreamHolder {
request.completionBlock = { [weak self] in
print("Request operation completed")
if let error = request.error {
print("Error occured \(error)")
self?.state = .none
} else {
guard let strong = self else { return }
Expand Down
4 changes: 2 additions & 2 deletions OBD2-Swift/Classes/Scanner/StreamHolder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ class StreamHolder: NSObject {
}

func write(data: Data) -> Int {
var bytesRemaining = data.count
var totalBytesWritten = 0
let bytesRemaining = data.count
let totalBytesWritten = 0

while bytesRemaining > 0 {
let bytesWritten = data.withUnsafeBytes {
Expand Down
2 changes: 1 addition & 1 deletion OBD2-Swift/Classes/Stream/StreamWriter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class StreamWriter {
}

func write() throws {
print("Write to OBD \(String(data: data, encoding: .ascii))")
print("Write to OBD \(String(describing: String(data: data, encoding: .ascii)))")

while data.count > 0 {
let bytesWritten = write(data: data)
Expand Down

0 comments on commit db544e7

Please sign in to comment.