Skip to content

Commit

Permalink
Fix unreachable statements (#268)
Browse files Browse the repository at this point in the history
* Add warning flag to compiler
* Fix unreachable statements

**Credit:** Zamir SUN <sztsian@gmail.com>
  • Loading branch information
abraunegg authored Dec 3, 2018
1 parent 9817104 commit cdb1132
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
DC = dmd
DFLAGS = -g -ofonedrive -O -L-lcurl -L-lsqlite3 -L-ldl -J.
DFLAGS = -w -g -ofonedrive -O -L-lcurl -L-lsqlite3 -L-ldl -J.
PREFIX = /usr/local
DOCDIR = $(PREFIX)/share/doc/onedrive
MANDIR = $(PREFIX)/share/man/man1
Expand Down
4 changes: 1 addition & 3 deletions src/onedrive.d
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,6 @@ final class OneDriveApi
// "else"
default:
throw new OneDriveException(http.statusLine.code, http.statusLine.reason);
break;
}
}

Expand All @@ -662,7 +661,7 @@ final class OneDriveApi
{
// 412 - Precondition Failed
case 412:
throw new OneDriveException(http.statusLine.code, http.statusLine.reason);
log.vlog("OneDrive returned a 'HTTP 412 - Precondition Failed' - gracefully handling error");
break;

// Server side (OneDrive) Errors
Expand All @@ -679,7 +678,6 @@ final class OneDriveApi
default:
if (http.statusLine.code / 100 != 2 && http.statusLine.code != 302) {
throw new OneDriveException(http.statusLine.code, http.statusLine.reason, response);
break;
}
}
}
Expand Down

0 comments on commit cdb1132

Please sign in to comment.