Commit efb432c9 by Edward Thomson

Merge pull request #3801 from ethomson/warning

cleanup: unused warning
parents 37dba1a7 14cf05da
......@@ -40,7 +40,6 @@ void git_commit__free(void *_commit)
static int git_commit__create_buffer_internal(
git_buf *out,
git_repository *repo,
const git_signature *author,
const git_signature *committer,
const char *message_encoding,
......@@ -51,7 +50,7 @@ static int git_commit__create_buffer_internal(
size_t i = 0;
const git_oid *parent;
assert(out && repo && tree);
assert(out && tree);
git_oid__writebuf(out, "tree ", tree);
......@@ -150,7 +149,7 @@ static int git_commit__create_internal(
if ((error = validate_tree_and_parents(&parents, repo, tree, parent_cb, parent_payload, current_id, validate)) < 0)
goto cleanup;
error = git_commit__create_buffer_internal(&buf, repo, author, committer,
error = git_commit__create_buffer_internal(&buf, author, committer,
message_encoding, message, tree,
&parents);
......@@ -813,7 +812,7 @@ int git_commit_create_buffer(git_buf *out,
return error;
error = git_commit__create_buffer_internal(
out, repo, author, committer,
out, author, committer,
message_encoding, message, tree_id,
&parents_arr);
......
......@@ -70,7 +70,7 @@ static int lock_file(git_filebuf *file, int flags, mode_t mode)
git_file source;
char buffer[FILEIO_BUFSIZE];
ssize_t read_bytes;
int error;
int error = 0;
source = p_open(file->path_original, O_RDONLY);
if (source < 0) {
......
......@@ -228,6 +228,9 @@ void git__free_tls_data(void)
BOOL WINAPI DllMain(HINSTANCE hInstDll, DWORD fdwReason, LPVOID lpvReserved)
{
GIT_UNUSED(hInstDll);
GIT_UNUSED(lpvReserved);
/* This is how Windows lets us know our thread is being shut down */
if (fdwReason == DLL_THREAD_DETACH) {
git__free_tls_data();
......
......@@ -1047,15 +1047,12 @@ static int rebase_commit_inmemory(
const char *message_encoding,
const char *message)
{
git_rebase_operation *operation;
git_commit *commit = NULL;
int error = 0;
operation = git_array_get(rebase->operations, rebase->current);
assert(operation);
assert(rebase->index);
assert(rebase->last_commit);
assert(rebase->current < rebase->operations.size);
if ((error = rebase_commit__create(&commit, rebase, rebase->index,
rebase->last_commit, author, committer, message_encoding, message)) < 0)
......
......@@ -229,6 +229,9 @@ static int make_submodule_dirty(git_submodule *sm, const char *name, void *paylo
git_buf dirtypath = GIT_BUF_INIT;
git_repository *submodule_repo;
GIT_UNUSED(name);
GIT_UNUSED(payload);
/* remove submodule directory in preparation for init and repo_init */
cl_git_pass(git_buf_joinpath(
&submodulepath,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment