summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/commit.c2
-rw-r--r--src/odb_loose.c3
-rw-r--r--src/win32/pthread.c7
3 files changed, 5 insertions, 7 deletions
diff --git a/src/commit.c b/src/commit.c
index 0c37ec59b..54d7a47fe 100644
--- a/src/commit.c
+++ b/src/commit.c
@@ -286,7 +286,7 @@ int commit_parse_buffer(git_commit *commit, const void *data, size_t len)
if (buffer < buffer_end) {
const char *line_end;
- size_t message_len = buffer_end - buffer;
+ size_t message_len;
/* Long message */
message_len = buffer_end - buffer;
diff --git a/src/odb_loose.c b/src/odb_loose.c
index 4f475f2c3..873dbfa0a 100644
--- a/src/odb_loose.c
+++ b/src/odb_loose.c
@@ -336,7 +336,6 @@ static int inflate_disk_obj(git_rawobj *out, gitfo_buf *obj)
{
unsigned char head[64], *buf;
z_stream zs;
- int z_status;
obj_hdr hdr;
size_t used;
@@ -350,7 +349,7 @@ static int inflate_disk_obj(git_rawobj *out, gitfo_buf *obj)
* inflate the initial part of the io buffer in order
* to parse the object header (type and size).
*/
- if ((z_status = start_inflate(&zs, obj, head, sizeof(head))) < Z_OK)
+ if (start_inflate(&zs, obj, head, sizeof(head)) < Z_OK)
return GIT_ERROR;
if ((used = get_object_header(&hdr, head)) == 0)
diff --git a/src/win32/pthread.c b/src/win32/pthread.c
index f47364a76..7e17b6bdf 100644
--- a/src/win32/pthread.c
+++ b/src/win32/pthread.c
@@ -48,16 +48,15 @@ int pthread_join(pthread_t thread, void **value_ptr)
int pthread_mutex_init(pthread_mutex_t *GIT_RESTRICT mutex,
const pthread_mutexattr_t *GIT_RESTRICT GIT_UNUSED(mutexattr))
{
- GIT_UNUSED_ARG(mutexattr);
+ GIT_UNUSED_ARG(mutexattr);
InitializeCriticalSection(mutex);
return 0;
}
int pthread_mutex_destroy(pthread_mutex_t *mutex)
{
- int ret;
- ret = CloseHandle(mutex);
- return -(!ret);
+ DeleteCriticalSection(mutex);
+ return 0;
}
int pthread_mutex_lock(pthread_mutex_t *mutex)