summaryrefslogtreecommitdiff
path: root/src/odb_loose.c
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill@shutemov.name>2011-08-30 23:55:22 +0300
committerKirill A. Shutemov <kirill@shutemov.name>2011-08-30 23:55:22 +0300
commitd568d5856bcc4f283ae1dda0e27d680ee22fb067 (patch)
treeaf00ec95f08de8425111d3f57474b6ad63f826b1 /src/odb_loose.c
parent51d0044629d0ac3e0f419910996c972b547f1156 (diff)
downloadlibgit2-d568d5856bcc4f283ae1dda0e27d680ee22fb067.tar.gz
CMakefile: add -Wmissing-prototypes and fix warnings
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Diffstat (limited to 'src/odb_loose.c')
-rw-r--r--src/odb_loose.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/odb_loose.c b/src/odb_loose.c
index a3a4e5b56..f78750899 100644
--- a/src/odb_loose.c
+++ b/src/odb_loose.c
@@ -481,7 +481,7 @@ static int locate_object(char *object_location, loose_backend *backend, const gi
}
/* Explore an entry of a directory and see if it matches a short oid */
-int fn_locate_object_short_oid(void *state, char *pathbuf) {
+static int fn_locate_object_short_oid(void *state, char *pathbuf) {
loose_locate_object_state *sstate = (loose_locate_object_state *)state;
size_t pathbuf_len = strlen(pathbuf);
@@ -577,7 +577,7 @@ static int locate_object_short_oid(char *object_location, git_oid *res_oid, loos
*
***********************************************************/
-int loose_backend__read_header(size_t *len_p, git_otype *type_p, git_odb_backend *backend, const git_oid *oid)
+static int loose_backend__read_header(size_t *len_p, git_otype *type_p, git_odb_backend *backend, const git_oid *oid)
{
char object_path[GIT_PATH_MAX];
git_rawobj raw;
@@ -599,7 +599,7 @@ int loose_backend__read_header(size_t *len_p, git_otype *type_p, git_odb_backend
return GIT_SUCCESS;
}
-int loose_backend__read(void **buffer_p, size_t *len_p, git_otype *type_p, git_odb_backend *backend, const git_oid *oid)
+static int loose_backend__read(void **buffer_p, size_t *len_p, git_otype *type_p, git_odb_backend *backend, const git_oid *oid)
{
char object_path[GIT_PATH_MAX];
git_rawobj raw;
@@ -620,7 +620,7 @@ int loose_backend__read(void **buffer_p, size_t *len_p, git_otype *type_p, git_o
return GIT_SUCCESS;
}
-int loose_backend__read_prefix(
+static int loose_backend__read_prefix(
git_oid *out_oid,
void **buffer_p,
size_t *len_p,
@@ -661,7 +661,7 @@ int loose_backend__read_prefix(
return GIT_SUCCESS;
}
-int loose_backend__exists(git_odb_backend *backend, const git_oid *oid)
+static int loose_backend__exists(git_odb_backend *backend, const git_oid *oid)
{
char object_path[GIT_PATH_MAX];
@@ -670,7 +670,7 @@ int loose_backend__exists(git_odb_backend *backend, const git_oid *oid)
return locate_object(object_path, (loose_backend *)backend, oid) == GIT_SUCCESS;
}
-int loose_backend__stream_fwrite(git_oid *oid, git_odb_stream *_stream)
+static int loose_backend__stream_fwrite(git_oid *oid, git_odb_stream *_stream)
{
loose_writestream *stream = (loose_writestream *)_stream;
loose_backend *backend = (loose_backend *)_stream->backend;
@@ -691,13 +691,13 @@ int loose_backend__stream_fwrite(git_oid *oid, git_odb_stream *_stream)
return git_filebuf_commit_at(&stream->fbuf, final_path);
}
-int loose_backend__stream_write(git_odb_stream *_stream, const char *data, size_t len)
+static int loose_backend__stream_write(git_odb_stream *_stream, const char *data, size_t len)
{
loose_writestream *stream = (loose_writestream *)_stream;
return git_filebuf_write(&stream->fbuf, data, len);
}
-void loose_backend__stream_free(git_odb_stream *_stream)
+static void loose_backend__stream_free(git_odb_stream *_stream)
{
loose_writestream *stream = (loose_writestream *)_stream;
@@ -720,7 +720,7 @@ static int format_object_header(char *hdr, size_t n, size_t obj_len, git_otype o
return len+1;
}
-int loose_backend__stream(git_odb_stream **stream_out, git_odb_backend *_backend, size_t length, git_otype type)
+static int loose_backend__stream(git_odb_stream **stream_out, git_odb_backend *_backend, size_t length, git_otype type)
{
loose_backend *backend;
loose_writestream *stream;
@@ -772,7 +772,7 @@ int loose_backend__stream(git_odb_stream **stream_out, git_odb_backend *_backend
return GIT_SUCCESS;
}
-int loose_backend__write(git_oid *oid, git_odb_backend *_backend, const void *data, size_t len, git_otype type)
+static int loose_backend__write(git_oid *oid, git_odb_backend *_backend, const void *data, size_t len, git_otype type)
{
int error, header_len;
char final_path[GIT_PATH_MAX], header[64];
@@ -815,7 +815,7 @@ cleanup:
return error;
}
-void loose_backend__free(git_odb_backend *_backend)
+static void loose_backend__free(git_odb_backend *_backend)
{
loose_backend *backend;
assert(_backend);